Pass along the string length instead of just null-terminating

This commit is contained in:
Eric Fischer 2014-02-06 13:28:35 -08:00
parent 1a7b4189bf
commit e9d2c94f93

View File

@ -386,6 +386,7 @@ again:
json_object *s = add_object(JSON_STRING, current, error); json_object *s = add_object(JSON_STRING, current, error);
if (s != NULL) { if (s != NULL) {
s->string = val.buf; s->string = val.buf;
s->length = val.n;
} }
return s; return s;