* src/tgbaalgos/closure.cc: Fix invalid read.

This commit is contained in:
Alexandre Duret-Lutz 2014-11-23 21:45:20 +01:00
parent ad3ea61ac2
commit 0beb148b6a

View file

@ -71,9 +71,11 @@ namespace spot
} }
if (need_new_trans) if (need_new_trans)
{ {
unsigned i = // Load t2.dst first, because t2 can be
a->new_transition(state, t2.dst, cond, acc); // invalidated by new_transition().
dst2trans[t2.dst].push_back(i); auto dst = t2.dst;
auto i = a->new_transition(state, dst, cond, acc);
dst2trans[dst].push_back(i);
todo.push_back(i); todo.push_back(i);
} }
} }