Don't add null terminator to each token.

This commit is contained in:
Benoit Blanchon committed 2014-01-11 22:39:28 +01:00
1 parent b53e0baadd
commit 0b485e95fa
2 files changed
+3 -6

No files matched your search

+3
View File
@@ -23,5 +23,8 @@ char* JsonObjectBase::getTokenString(jsmntok_t* token)
if (token->type != JSMN_PRIMITIVE && token->type != JSMN_STRING)
return 0;
// add null terminator to the string
json[token->end] = 0;
return json + token->start;
}