From 773883c486fa891fbff50826096db587ef73164d Mon Sep 17 00:00:00 2001 From: UKABUER Date: Thu, 9 Jan 2020 22:56:43 +0800 Subject: [PATCH] Fix #420 (#421) --- include/simdjson/parsedjsoniterator.h | 4 ++++ singleheader/simdjson.h | 4 ++++ 2 files changed, 8 insertions(+) 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; }