From 6ca6ee5a6f199b1299ac9cdc130977bcaed30903 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Sun, 4 Apr 2021 12:25:05 -0400 Subject: [PATCH] Correcting what seems to be a typo and adding some extra logging. (#1535) --- src/generic/stage2/json_iterator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generic/stage2/json_iterator.h b/src/generic/stage2/json_iterator.h index 242d8abd..198a0f8a 100644 --- a/src/generic/stage2/json_iterator.h +++ b/src/generic/stage2/json_iterator.h @@ -125,12 +125,12 @@ simdjson_warn_unused simdjson_really_inline error_code json_iterator::walk_docum { auto value = advance(); - // Make sure the outer hash or array is closed before continuing; otherwise, there are ways we + // Make sure the outer object or array is closed before continuing; otherwise, there are ways we // could get into memory corruption. See https://github.com/simdjson/simdjson/issues/906 if (!STREAMING) { switch (*value) { - case '{': if (last_structural() != '}') { return TAPE_ERROR; }; break; - case '[': if (last_structural() != ']') { return TAPE_ERROR; }; break; + case '{': if (last_structural() != '}') { log_value("starting brace unmatched"); return TAPE_ERROR; }; break; + case '[': if (last_structural() != ']') { log_value("starting bracket unmatched"); return TAPE_ERROR; }; break; } }