diff --git a/src/json.c b/src/json.c index 18495a42..e6a25abe 100644 --- a/src/json.c +++ b/src/json.c @@ -5,7 +5,6 @@ #include "math.h" /* Non-standard-conforming JSON parser. - * - Unicode not supported (TODO) * - Unicode escape sequences in strings (\u) not supported * - Leading 0s in numbers are allowed */ @@ -787,7 +786,7 @@ INTERNAL void parse(struct arena *arena, struct parser *p) ++stack_count; /* Create child & push to stack */ - struct json *child = arena_push(arena, struct json); + struct json *child = arena_push_zero(arena, struct json); child->parent = json; *arena_push(scratch.arena, struct json *) = child; ++stack_count; @@ -795,7 +794,7 @@ INTERNAL void parse(struct arena *arena, struct parser *p) /* Check for comma */ if (at->type == TOKEN_TYPE_COMMA) { /* Create sibling & push to stack */ - struct json *sibling = arena_push(arena, struct json); + struct json *sibling = arena_push_zero(arena, struct json); sibling->parent = parent_json; *arena_push(scratch.arena, struct json *) = sibling; ++stack_count;