aboutsummaryrefslogtreecommitdiff
path: root/tests/message.c
diff options
context:
space:
mode:
authorDisconnect3d <dominik.b.czarnota@gmail.com>2020-04-13 16:32:18 +0200
committerGarrett D'Amore <garrett@damore.org>2020-04-13 09:06:04 -0700
commit87c782d6b073a75ed5df97fc89011c0c758787f0 (patch)
tree845f5f2d0e240bad918a49845dcfd920c45b4a21 /tests/message.c
parentff99ee51b34268f00aab3efd858e0798e92417c3 (diff)
downloadnng-87c782d6b073a75ed5df97fc89011c0c758787f0.tar.gz
nng-87c782d6b073a75ed5df97fc89011c0c758787f0.tar.bz2
nng-87c782d6b073a75ed5df97fc89011c0c758787f0.zip
Fix message realloc test off by one str comparison
Diffstat (limited to 'tests/message.c')
-rw-r--r--tests/message.c2
1 files changed, 1 insertions, 1 deletions
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);