Skip to content

Commit

Permalink
Fix iterator equality check bug in graphml_witness.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
reuk committed Nov 24, 2017
1 parent 60ef5aa commit 18656b2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/goto-programs/graphml_witness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Author: Daniel Kroening
#include <util/prefix.h>
#include <util/ssa_expr.h>

#include <goto-programs/goto_program_template.h>

void graphml_witnesst::remove_l0_l1(exprt &expr)
{
if(expr.id()==ID_symbol)
Expand Down Expand Up @@ -241,10 +243,10 @@ void graphml_witnesst::operator()(const goto_tracet &goto_trace)
continue;
}

goto_tracet::stepst::const_iterator next=it;
for(++next;
next!=goto_trace.steps.end() &&
(step_to_node[next->step_nr]==sink || it->pc==next->pc);
auto next = std::next(it);
for(; next != goto_trace.steps.end() &&
(step_to_node[next->step_nr] == sink ||
pointee_address_equalt{}(it->pc, next->pc)); // NOLINT
++next)
{
// advance
Expand Down

0 comments on commit 18656b2

Please sign in to comment.