mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-19 02:47:06 +00:00
Fix off by one error in code_49
This commit is contained in:
committed by
Robin Stuart
parent
63a252a573
commit
1911b28865
@@ -208,10 +208,10 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], const int length
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (M != 0) {
|
if (M != 0) {
|
||||||
|
codeword_count--;
|
||||||
for (i = 0; i < codeword_count; i++) {
|
for (i = 0; i < codeword_count; i++) {
|
||||||
codewords[i] = codewords[i + 1];
|
codewords[i] = codewords[i + 1];
|
||||||
}
|
}
|
||||||
codeword_count--;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (codeword_count > 49) {
|
if (codeword_count > 49) {
|
||||||
@@ -335,4 +335,4 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], const int length
|
|||||||
symbol->border_width = 2;
|
symbol->border_width = 2;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user