gs1.c: Allow 0-length AI data if GS1NOCHECK_MODE, props codemonkey82 (#204)

This commit is contained in:
gitlost
2021-09-13 17:54:46 +01:00
parent 9229634826
commit 86c15741d8
5 changed files with 128 additions and 119 deletions

View File

@ -2757,7 +2757,7 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
if (ai_latch == 0) {
bwipp_data[j++] = '[';
}
last_ai = atoi(bwipp_data + i + 1);
last_ai = to_int((unsigned char *) (bwipp_data + i + 1), 2);
if ((last_ai >= 0 && last_ai <= 4) || (last_ai >= 11 && last_ai <= 20) || last_ai == 23
|| (last_ai >= 31 && last_ai <= 36) || last_ai == 41) {
ai_latch = 1;