changeset 1484:a0166c4050be

Fix dmGrowBufPut() to not include extra byte.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 11 May 2018 04:21:34 +0300
parents 1e7f7489d3e0
children 06a9c16601d6
files src/dmgrowbuf.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmgrowbuf.c	Fri May 11 04:21:15 2018 +0300
+++ b/src/dmgrowbuf.c	Fri May 11 04:21:34 2018 +0300
@@ -130,10 +130,10 @@
     if (str == NULL)
         return FALSE;
 
-    if (!dmGrowBufGrow(buf, len + 1))
+    if (!dmGrowBufGrow(buf, len))
         return FALSE;
 
-    memcpy(buf->data + buf->len, str, len + 1);
+    memcpy(buf->data + buf->len, str, len);
     buf->len += len;
 
     return TRUE;