Skip to content

Commit

Permalink
fix bug in issue#1972
Browse files Browse the repository at this point in the history
  • Loading branch information
dota17 committed May 30, 2020
1 parent 53ef076 commit 4350c5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/nlohmann/detail/input/json_sax.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ class json_sax_dom_callback_parser
ref_stack.pop_back();
keep_stack.pop_back();

if (not ref_stack.empty() and ref_stack.back() and ref_stack.back()->is_object())
if (not ref_stack.empty() and ref_stack.back() and ref_stack.back()->is_structured())
{
// remove discarded value
for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it)
Expand Down
2 changes: 1 addition & 1 deletion single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5358,7 +5358,7 @@ class json_sax_dom_callback_parser
ref_stack.pop_back();
keep_stack.pop_back();

if (not ref_stack.empty() and ref_stack.back() and ref_stack.back()->is_object())
if (not ref_stack.empty() and ref_stack.back() and ref_stack.back()->is_structured())
{
// remove discarded value
for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it)
Expand Down

0 comments on commit 4350c5e

Please sign in to comment.