1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-07-30 18:09:50 +00:00

AZTEC: fix return type of az_all_byte_only_or_uld() char -> int

so that the -1 compare doesn't fail on default unsigned char
  machines (e.g. arm) (ticket #355, props codemonkey82)
This commit is contained in:
gitlost
2026-06-30 16:35:56 +01:00
parent a81c9d9258
commit fdaed0b1c8
2 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -410,7 +410,7 @@ static int az_text_modes(char modes[], unsigned char source[], const int length,
/* Cheapo to check if input all of one type of Byte-only, Upper, Lower or Digit, returning AZ_B, AZ_U, AZ_L or AZ_D
resp., or -1 if not */
static char az_all_byte_only_or_uld(const unsigned char source[], const int length) {
static int az_all_byte_only_or_uld(const unsigned char source[], const int length) {
int i;
int byte_only, upper, lower, digit;
+25
View File
@@ -9877,6 +9877,31 @@ static void test_fuzz(const testCtx *const p_ctx) {
"\x25\xaa\x8f\x7c\x21\xd6\xfd\xa5\x2b\x4e\xc7\x48\x52\xdb\xa8\xde\x59\x64\x11\xb3\x32\x70\x98\x60\x12\x52\x1b\x39\xc2\xc3\x17\xd3\xd1\x40\x6c\x4b\x24\x57\x18",
1359, 0, "", 899
}, /* #347 Francois Grieu */
/* 14*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1,
"\x5B\x29\x3E\x7E\x44\x33\x30\x30\x31\x7E\x44\x32\x39\x30\x32\x38\x39\x30\x37\x35\x20\x20\x20\x20\x7E\x44\x32\x39\x20\x20\x20\x7E\x44\x32\x39\x20\x20\x20\x7E\x44"
"\x32\x39\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x32\x39\x47\x45\x4F\x50\x7E\x44\x32\x39\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
"\x20\x20\x20\x20\x20\x7E\x44\x32\x39\x30\x30\x31\x7E\x44\x32\x39\x30\x30\x30\x35\x37\x37\x30\x32\x32\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x32\x39\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x32\x39\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x32\x39\x4E\x7E\x44"
"\x32\x39\x4D\x75\x73\x74\x65\x72\x73\x74\x72\x61\x73\x73\x65\x20\x31\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44"
"\x32\x39\x55\x6C\x6D\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x32"
"\x39\x4D\x61\x78\x20\x4D\x75\x73\x74\x65\x72\x6D\x61\x6E\x6E\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x32\x39"
"\x7E\x44\x33\x30\x30\x37\x7E\x44\x32\x39\x47\x30\x32\x7E\x44\x32\x39\x30\x7E\x44\x32\x39\x30\x7E\x44\x32\x39\x30\x7E\x44\x32\x39\x7E\x44\x33\x31\x20\x20\x20\x20"
"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x33\x31\x7E\x44\x33\x31\x30"
"\x36\x37\x30\x34\x31\x33\x38\x38\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x33\x31\x7E\x44\x33\x31\x7E\x44\x33\x31\x20\x20\x20\x20"
"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
"\x20\x20\x20\x20\x20\x20\x7E\x44\x33\x31\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x33\x31\x7E\x44\x33\x31\x7E\x44\x33\x31\x7E\x44\x32\x39\x7E\x44\x32\x39\x7E\x44"
"\x32\x39\x7E\x44\x32\x39\x30\x30\x30\x30\x32\x30\x34\x33\x33\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
"\x20\x7E\x44\x32\x39\x4B\x47\x4F\x06\x30\x37\x32\x30\x32\x31\x00\x36\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x32\x39"
"\x7E\x44\x32\x39\x7E\x44\x32\x39\x4B\x47\x4F\x06\x30\x37\x32\x30\x32\x31\x00\x36\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E"
"\x44\x32\x39\x7E\x44\x32\x39\x7E\x44\x33\x30\x30\x37\x7E\x44\x32\x39\x53\x30\x31\x30\x7E\x44\x32\x39\x58\x58\x58\x58\x20\x58\x58\x58\x58\x58\x58\x58\x58\x20\x58"
"\x58\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x33\x31\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x33\x31\x7E\x44\x33\x31\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x33\x31\x58\x58\x20\x58\x58\x58\x20\x58\x58\x58\x58"
"\x58\x58\x58\x58\x58\x20\x34\x30\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x33\x31\x7E\x44\x33\x31\x58\x58\x58\x58\x58\x58\x58\x58"
"\x58\x58\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7E\x44\x33\x31\x38\x39\x35\x32\x30\x20\x20\x20\x20"
"\x7E\x44\x33\x31\x32\x37\x36\x7E\x44\x33\x31\x7E\x44\x33\x30\x30\x37\x7E\x44\x32\x39\x53\x30\x32\x30\x7E\x44\x32\x39\x7E\x44\x32\x39\x7E\x44\x32\x39\x7E\x44\x32"
"\x39\x7E\x44\x33\x30\x30\x37\x7E\x44\x32\x39\x53\x30\x33\x30\x7E\x44\x32\x39\x7E\x44\x32\x39",
864, 0, "", -1
}, /* #355 codemonkey82 */
};
const int data_size = ARRAY_SIZE(data);
int i, length, ret;