added null terminating char to add_brackets
This commit is contained in:
parent
2121ec6786
commit
952658b281
@ -112,7 +112,7 @@ void add_brackets(char **json)
|
|||||||
{
|
{
|
||||||
char *output = why2_calloc(strlen(*json) + 3, sizeof(char));
|
char *output = why2_calloc(strlen(*json) + 3, sizeof(char));
|
||||||
|
|
||||||
sprintf(output, "{%s}", *json);
|
sprintf(output, "{%s}%c", *json, '\0');
|
||||||
|
|
||||||
why2_deallocate(*json);
|
why2_deallocate(*json);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user