fix out of range access in test on platforms which are actually shrinking the buffer

9 days ago

author
Mike Becker <universe@uap-core.de>
date
Sun, 15 Dec 2024 16:42:44 +0100 (9 days ago)
changeset 1023
989e144c912a
parent 1022
2911c1f4a570
child 1026
ca20f9ffcb62

fix out of range access in test on platforms which are actually shrinking the buffer

tests/test_buffer.c file | annotate | diff | comparison | revisions
--- a/tests/test_buffer.c	Sun Dec 15 16:28:05 2024 +0100
+++ b/tests/test_buffer.c	Sun Dec 15 16:42:44 2024 +0100
@@ -845,7 +845,7 @@
         CX_TEST_ASSERT(buf.size == 8);
         CX_TEST_ASSERT(buf.pos == 8);
         CX_TEST_ASSERT(buf.capacity > 8);
-        CX_TEST_ASSERT(0 == memcmp(buf.space, "preptest\0A", 10));
+        CX_TEST_ASSERT(0 == memcmp(buf.space, "preptest\0", 9));
     }
     cxBufferDestroy(&buf);
 }

mercurial