Skip to content

Commit

Permalink
Fix expr iterator mutation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
reuk committed Nov 24, 2017
1 parent 8de0ea3 commit 82d42e5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/util/expr_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ class depth_iterator_baset
depth_iterator_t &next_sibling_or_parent()
{
PRECONDITION(!m_stack.empty());
m_stack.back().it=m_stack.back().end;
++(*this);
m_stack.pop_back();
if(!m_stack.empty())
{
++m_stack.back().it;
return ++(*this);
}
return this->downcast();
}

Expand Down

0 comments on commit 82d42e5

Please sign in to comment.