Skip to content

Commit

Permalink
Merge pull request #59 from Homletmoo/master
Browse files Browse the repository at this point in the history
Fix null-termination bug in WJEWriteMEM.
  • Loading branch information
penduin committed Sep 5, 2016
2 parents bac2b64 + 31b18c8 commit 6592230
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wjelement/element.c
Expand Up @@ -702,5 +702,5 @@ EXPORT char * WJEWriteMEM(WJElement document, XplBool pretty, size_t maxlength)
WJEWriteDocument(document, memWriter, NULL);
WJWCloseDocument(memWriter);
}
return MemRealloc(data.buffer, strlen(data.buffer));
return MemRealloc(data.buffer, strlen(data.buffer) + 1);
}

0 comments on commit 6592230

Please sign in to comment.