diff options
Diffstat (limited to 'lib/std/json/dynamic.zig')
| -rw-r--r-- | lib/std/json/dynamic.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/json/dynamic.zig b/lib/std/json/dynamic.zig index dae9ba836d..a5aa80a888 100644 --- a/lib/std/json/dynamic.zig +++ b/lib/std/json/dynamic.zig @@ -124,7 +124,7 @@ pub const Value = union(enum) { .array_begin => { try stack.append(Value{ .array = Array.init(allocator) }); }, - .array_end => return try handleCompleteValue(&stack, allocator, source, stack.pop(), options) orelse continue, + .array_end => return try handleCompleteValue(&stack, allocator, source, stack.pop().?, options) orelse continue, else => unreachable, } @@ -171,7 +171,7 @@ fn handleCompleteValue(stack: *Array, allocator: Allocator, source: anytype, val switch (try source.nextAllocMax(allocator, .alloc_always, options.max_value_len.?)) { .object_end => { // This object is complete. - value = stack.pop(); + value = stack.pop().?; // Effectively recurse now that we have a complete value. if (stack.items.len == 0) return value; continue; |
