1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-18 10:27:09 +00:00

gs1: fix keyoff1() last commit [3f7cfd], error position does not

need adjusting (unfortunately no test possible currently as for
  AIs 00-03 lengths > 4 and `numeric()` catches it anyway)
This commit is contained in:
gitlost
2025-01-31 22:02:49 +00:00
parent 3f7cfd47c7
commit 21ed7b48dd

View File

@@ -292,12 +292,7 @@ static int key(const unsigned char *data, int data_len, int offset, int min, int
static int keyoff1(const unsigned char *data, int data_len, int offset, int min, int max, int *p_err_no,
int *p_err_posn, char err_msg[50], const int length_only) {
if (!key(data, data_len, offset + 1, min - 1, max - 1, p_err_no, p_err_posn, err_msg, length_only)) {
(*p_err_posn)--;
return 0;
}
return 1;
return key(data, data_len, offset + 1, min - 1, max - 1, p_err_no, p_err_posn, err_msg, length_only);
}
/* Note following date/time checkers (!length_only) assume data all digits, i.e. `numeric()` has succeeded */