From cd5607e7d8566687aa0ac1ca10b91543ebd16c89 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 13 Dec 2012 11:41:38 +0000 Subject: [PATCH] - use correct size for message --- src/mesh/mesh_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 7564a7ec5..cdc551f3d 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -1843,7 +1843,7 @@ GNUNET_MESH_announce_regex (struct GNUNET_MESH_Handle *h, offset = 0; do { - msgsize = (len > offset + payload) ? payload : len; + msgsize = (len - offset > payload) ? payload : len - offset; memcpy (&msg[1], ®ex[offset], msgsize); offset += msgsize; msgsize += sizeof(struct GNUNET_MESH_RegexAnnounce); -- 2.25.1