mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-17 18:07:02 +00:00
gs1: csumalpha: improve warning, report both checksum chars
(ticket #332, props Harald Oehlmann)
This commit is contained in:
@@ -21,6 +21,8 @@ Changes
|
||||
`option_1` by setting to -1 (min 3 words), 0 (<5% + 3 words)
|
||||
- Better warning messages on non-compliant heights
|
||||
- composite: warn if CC type upped from requested
|
||||
- gs1: csumalpha: improve warning, report both chars (ticket #332, props Harald
|
||||
Oehlmann)
|
||||
|
||||
Bugs
|
||||
----
|
||||
|
||||
@@ -255,14 +255,8 @@ static int csumalpha(const unsigned char *data, int data_len, int offset, int mi
|
||||
|
||||
if (de[0] != c1 || de[1] != c2) {
|
||||
*p_err_no = 3;
|
||||
if (de[0] != c1) {
|
||||
*p_err_posn = (de - data) + 1;
|
||||
(void) gs1_err_msg_printf_nochk(err_msg, "Bad checksum '%c', expected '%c'", de[0], c1);
|
||||
} else {
|
||||
*p_err_posn = (de + 1 - data) + 1;
|
||||
(void) gs1_err_msg_printf_nochk(err_msg, "Bad checksum '%c', expected '%c'", de[1], c2);
|
||||
}
|
||||
return 0;
|
||||
*p_err_posn = (de - data) + 1;
|
||||
return gs1_err_msg_printf_nochk(err_msg, "Bad checksum '%.2s', expected '%c%c'", de, c1, c2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user