diff options
author | Bart Polot <bart@net.in.tum.de> | 2012-12-13 11:41:38 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2012-12-13 11:41:38 +0000 |
commit | cd5607e7d8566687aa0ac1ca10b91543ebd16c89 (patch) | |
tree | e8bf30ff2828bc77e8561b1709ecf89537e6726a | |
parent | af69da485fd33e58fb827c0686e77f63cf5702c2 (diff) |
- use correct size for message
-rw-r--r-- | src/mesh/mesh_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 7564a7ec58..cdc551f3dd 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); |