CODEONE/DATAMATRIX/MAILMARK/PLESSEY: fix some 32-bit/portability bugs

PLESSEY: add options NCR weighted mod-10, hide check digit(s) in HRT
test suite: now runnable under MSVC 2019, 2017, 2015, MinGW/MSYS
win32/README: update with MSVC 2019 and CMake instructions
This commit is contained in:
gitlost
2021-06-10 11:15:39 +01:00
parent f471bb6e50
commit 4a8cac2a5a
63 changed files with 1189 additions and 983 deletions

View File

@ -780,8 +780,9 @@ static void test_utf8_to_eci_ucs2be(void) {
int length = data[i].length != -1 ? data[i].length : (int) strlen(data[i].data);
int out_length = length;
int eci_length = get_eci_length(data[i].eci, (const unsigned char *) data[i].data, length);
char *dest = alloca(eci_length + 1);
char dest[1024];
assert_nonzero(eci_length + 1 <= 1024, "i:%d eci_length %d + 1 > 1024\n", i, eci_length);
ret = utf8_to_eci(data[i].eci, (const unsigned char *) data[i].data, (unsigned char *) dest, &out_length);
assert_equal(ret, data[i].ret, "i:%d utf8_to_eci ret %d != %d\n", i, ret, data[i].ret);
if (ret == 0) {