A couple of small bugfixes were found by the PIRAmIDE project.

This commit is contained in:
hooper114 2010-03-29 20:57:12 +00:00
parent 3d1f2dc29c
commit 4782ebb76d
2 changed files with 2 additions and 2 deletions

View File

@ -1982,7 +1982,7 @@ int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int src_len)
elements in the data characters. */
checksum = 0;
for(i = 0; i < data_chars; i++) {
row = weight_rows[(((data_chars - 3) / 2) * 21) + i];
row = weight_rows[(((data_chars - 2) / 2) * 21) + i];
for(j = 0; j < 8; j++) {
checksum += (char_widths[i][j] * checksum_weight_exp[(row * 8) + j]);

View File

@ -173,7 +173,7 @@ static int checksum_weight_exp[184] = { /* Table 14 */
76, 17, 51, 153, 37, 111, 122, 155,
43, 129, 176, 106, 107, 110, 119, 146,
16, 48, 144, 10, 30, 90, 59, 177,
109, 166, 137, 200, 178, 112, 125, 164,
109, 116, 137, 200, 178, 112, 125, 164,
70, 210, 208, 202, 184, 130, 179, 115,
134, 191, 151, 31, 93, 68, 204, 190,
148, 22, 66, 198, 172, 94, 71, 2,