1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-07-31 02:19:50 +00:00

gs1_lint_parse_raw_caret: check that data of AIs with non-predefined

lengths are terminated with separators (unless last)
  (ticket #352, props Simon Resch)
This commit is contained in:
gitlost
2026-03-18 14:24:40 +00:00
parent b3a3c0d3b4
commit db03f0b304
3 changed files with 13 additions and 6 deletions
+3
View File
@@ -3421,6 +3421,9 @@ static void test_gs1_lint_parse_raw_caret(const testCtx *const p_ctx) {
/* 44*/ { "^2551234567890128^39401234^4101234567890128", 1, 3, { 255, 3940, 410, 0 }, { 1, 18, 27, 0 }, { 4, 22, 30, 0 }, { 13, 4, 13, 0 }, 0, 0 },
/* 45*/ { "2551234567890128\03539401234\0354101234567890128", 1, 3, { 255, 3940, 410, 0 }, { 0, 17, 26, 0 }, { 3, 21, 29, 0 }, { 13, 4, 13, 0 }, 0, 0 },
/* 46*/ { "\0352551234567890128\03539401234\0354101234567890128", 1, 3, { 255, 3940, 410, 0 }, { 1, 18, 27, 0 }, { 4, 22, 30, 0 }, { 13, 4, 13, 0 }, 0, 0 },
/* 47*/ { "1012345678901234567890211", 0, 0, { 10, 0, 0, 0 }, { 0, 0, 0, 0 }, { 2, 0, 0, 0 }, { 20, 0, 0, 0 }, 2, 1 }, /* Ticket #352, props Simon Resch */
/* 48*/ { "^1012345678901234567890^211", 1, 2, { 10, 21, 0, 0 }, { 1, 24, 0, 0 }, { 3, 26, 0, 0 }, { 20, 1, 0, 0 }, 0, 0 },
/* 49*/ { "1012345678901234567890\035211", 1, 2, { 10, 21, 0, 0 }, { 0, 23, 0, 0 }, { 2, 25, 0, 0 }, { 20, 1, 0, 0 }, 0, 0 },
};
const int data_size = ARRAY_SIZE(data);
int i, length, ret;