diff options
Diffstat (limited to 'test/parse2-auto.c')
-rw-r--r-- | test/parse2-auto.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parse2-auto.c b/test/parse2-auto.c index ee717c3..3d4b0e0 100644 --- a/test/parse2-auto.c +++ b/test/parse2-auto.c @@ -219,7 +219,8 @@ void run_test(const uint8_t *data, size_t len, const char *exp, size_t explen) dump_sheet(sheet, buf, &buflen); - if (2 * explen - buflen != explen || memcmp(buf, exp, explen) != 0) { + if (2 * explen - buflen != explen || + (explen > 0 && memcmp(buf, exp, explen) != 0)) { printf("Expected (%u):\n%.*s\n", (int) explen, (int) explen, exp); printf("Result (%u):\n%.*s\n", (int) (2 * explen - buflen), |