mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-14 15:14:49 -04:00
Correct ECI but in DotCode
Avoid creating codewords > 112 Fixes #174 reported by Milton Neal
This commit is contained in:
parent
af50515a49
commit
2faff4e76f
1 changed files with 2 additions and 2 deletions
|
@ -496,8 +496,8 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
|||
// the next three codewords valued A, B & C encode the ECI value of
|
||||
// (A - 40) * 12769 + B * 113 + C + 40 (Section 5.2.1)
|
||||
int a, b, c;
|
||||
a = (symbol->eci - 40) % 12769;
|
||||
b = ((symbol->eci - 40) - (12769 * a)) % 113;
|
||||
a = (symbol->eci - 40) / 12769;
|
||||
b = ((symbol->eci - 40) - (12769 * a)) / 113;
|
||||
c = (symbol->eci - 40) - (12769 * a) - (113 * b);
|
||||
|
||||
codeword_array[array_length] = a + 40;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue