Correcting what seems to be a typo and adding some extra logging. (#1535)
This commit is contained in:
parent
78cff7518b
commit
6ca6ee5a6f
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue