From 87c782d6b073a75ed5df97fc89011c0c758787f0 Mon Sep 17 00:00:00 2001 From: Disconnect3d Date: Mon, 13 Apr 2020 16:32:18 +0200 Subject: Fix message realloc test off by one str comparison --- tests/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/message.c b/tests/message.c index 05d9b2e1..22dd2852 100644 --- a/tests/message.c +++ b/tests/message.c @@ -138,7 +138,7 @@ TestMain("Message Tests", { So(strcmp(nng_msg_body(msg), "abc") == 0); So(nng_msg_realloc(msg, 2) == 0); So(nng_msg_len(msg) == 2); - So(memcmp(nng_msg_body(msg), "abc", 2) == 0); + So(memcmp(nng_msg_body(msg), "abc", 3) == 0); So(nng_msg_append(msg, "CDEF", strlen("CDEF") + 1) == 0); So(nng_msg_len(msg) == strlen("abCDEF") + 1); -- cgit v1.2.3-70-g09d2