mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-24 12:07:00 -04:00
Use passed length instead of \0 to detect source string length
This commit is contained in:
parent
a0f703f7de
commit
5b92413085
1 changed files with 1 additions and 1 deletions
|
@ -164,7 +164,7 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], const unsigne
|
||||||
data_length[i] = 0;
|
data_length[i] = 0;
|
||||||
do {
|
do {
|
||||||
data_length[i]++;
|
data_length[i]++;
|
||||||
} while ((source[data_location[i] + data_length[i] - 1] != '[') && (source[data_location[i] + data_length[i] - 1] != '\0'));
|
} while ((source[data_location[i] + data_length[i] - 1] != '[') && (data_location[i] + data_length[i] <= src_len));
|
||||||
data_length[i]--;
|
data_length[i]--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue