1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-20 03:17:12 +00:00

Corrected reed-solomon/Data Matrix bug

This commit is contained in:
hooper114
2008-10-12 18:52:54 +00:00
parent 5994ff5cf7
commit 944a754fee
6 changed files with 19 additions and 20 deletions

View File

@@ -221,6 +221,7 @@ static void ecc200(unsigned char *binary, int bytes, int datablock, int rsblock)
for (n = b; n < rsblock * blocks; n += blocks)
binary[bytes + n] = ecc[p--];
}
rs_free();
}
/*
@@ -237,6 +238,7 @@ char ecc200encode(unsigned char *t, int tl, unsigned char *s, int sl, char *enco
fprintf(stderr, "Encoding string too short\n");
return 0;
}
// do the encoding
while (sp < sl && tp < tl) {
char newenc = enc; // suggest new encoding
@@ -851,14 +853,12 @@ int iec16022ecc200(unsigned char *barcode, int barcodelen, struct zint_symbol *s
}
symbol->row_height[(H - y) - 1] = 1;
}
free(grid);
free(places);
}
symbol->rows = H;
symbol->width = W;
free(encoding);
return 0;
}