Skip to content

Commit bc67a39

Browse files
committed
Improve bson_cursor
1 parent 814bb2d commit bc67a39

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/jsoncons_ext/bson/bson_parser.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ class basic_bson_parser : public ser_context
275275

276276
visitor.end_object(*this,ec);
277277
more_ = !cursor_mode_;
278+
if (level() == mark_level_)
279+
{
280+
more_ = false;
281+
}
278282
if (JSONCONS_UNLIKELY(state_stack_.back().pos != state_stack_.back().length))
279283
{
280284
ec = bson_errc::size_mismatch;
@@ -319,6 +323,10 @@ class basic_bson_parser : public ser_context
319323

320324
visitor.end_array(*this, ec);
321325
more_ = !cursor_mode_;
326+
if (level() == mark_level_)
327+
{
328+
more_ = false;
329+
}
322330
if (JSONCONS_UNLIKELY(state_stack_.back().pos != state_stack_.back().length))
323331
{
324332
ec = bson_errc::size_mismatch;

0 commit comments

Comments
 (0)