diff --git a/include/simdjson/parsedjsoniterator.h b/include/simdjson/parsedjsoniterator.h index 707ef5cf5..79b8fc7c1 100644 --- a/include/simdjson/parsedjsoniterator.h +++ b/include/simdjson/parsedjsoniterator.h @@ -331,6 +331,7 @@ bool ParsedJson::BasicIterator::move_to_key(const char *key) { return true; } } while (next()); + up(); } return false; } @@ -346,6 +347,7 @@ bool ParsedJson::BasicIterator::move_to_key_insensitive( return true; } } while (next()); + up(); } return false; } @@ -362,6 +364,7 @@ bool ParsedJson::BasicIterator::move_to_key(const char *key, return true; } } while (next()); + up(); } return false; } @@ -378,6 +381,7 @@ bool ParsedJson::BasicIterator::move_to_index(uint32_t index) { if (i == index) { return true; } + up(); } return false; } diff --git a/singleheader/simdjson.h b/singleheader/simdjson.h index d0ca02f30..119ce8c64 100755 --- a/singleheader/simdjson.h +++ b/singleheader/simdjson.h @@ -1246,6 +1246,7 @@ bool ParsedJson::BasicIterator::move_to_key(const char *key) { return true; } } while (next()); + up(); } return false; } @@ -1261,6 +1262,7 @@ bool ParsedJson::BasicIterator::move_to_key_insensitive( return true; } } while (next()); + up(); } return false; } @@ -1277,6 +1279,7 @@ bool ParsedJson::BasicIterator::move_to_key(const char *key, return true; } } while (next()); + up(); } return false; } @@ -1293,6 +1296,7 @@ bool ParsedJson::BasicIterator::move_to_index(uint32_t index) { if (i == index) { return true; } + up(); } return false; }