Closes #262 : fix parsing of Data Matrix with dimension >= 144

This commit is contained in:
Sean Owen 2014-12-04 16:45:48 -06:00
parent aa97cd17fb
commit 344d55e688
2 changed files with 4 additions and 2 deletions

View file

@ -124,3 +124,4 @@ Wolfgang Jung
Yahoe001 Yahoe001
Yakov Okshtein (Google) Yakov Okshtein (Google)
Yao Wei Yao Wei
Younes CHTIOUI

View file

@ -94,8 +94,9 @@ final class DataBlock {
int max = result[0].codewords.length; int max = result[0].codewords.length;
for (int i = longerBlocksNumDataCodewords; i < max; i++) { for (int i = longerBlocksNumDataCodewords; i < max; i++) {
for (int j = 0; j < numResultBlocks; j++) { for (int j = 0; j < numResultBlocks; j++) {
int iOffset = specialVersion && j > 7 ? i - 1 : i; int jOffset = specialVersion ? (j + 8) % numResultBlocks : j;
result[j].codewords[iOffset] = rawCodewords[rawCodewordsOffset++]; int iOffset = specialVersion && jOffset > 7 ? i - 1 : i;
result[jOffset].codewords[iOffset] = rawCodewords[rawCodewordsOffset++];
} }
} }