Put a missing NULL character to clear the string

Fork of PubNub by PubNub

Files at this revision

API Documentation at this revision

Comitter:
mkilivan
Date:
Wed Nov 19 21:39:14 2014 +0000
Parent:
4:a4759c403023
Commit message:
Clear the end of string

Changed in this revision

PubNub.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/PubNub.cpp	Sun Mar 02 01:48:40 2014 +0000
+++ b/PubNub.cpp	Wed Nov 19 21:39:14 2014 +0000
@@ -437,6 +437,7 @@
     /* Shrink memory buffer to bare minimum. */
     memmove(reply, reply + 2, i-2-2);
     m_replylen = i-2-2;
+    reply[m_replylen] = 0;
     m_replybuf = (char *) realloc(reply, m_replylen);
 
     return PNR_OK;