tgba_digraph: Fix handling of initial state.
* src/tgba/tgbagraph.hh: Store the number of the initial state, not a pointer to it, because if the state vector is reallocated due to some later calls to new_state(), this pointer will be invalid. * src/graphtest/tgbagraph.cc, src/graphtest/tgbagraph.test: Test for this.
This commit is contained in:
parent
fd5fbda4dd
commit
ff83e92db4
3 changed files with 37 additions and 18 deletions
|
|
@ -82,6 +82,11 @@ void f1()
|
|||
|
||||
std::cerr << tg.num_transitions() << '\n';
|
||||
assert(tg.num_transitions() == 5);
|
||||
|
||||
// Add enough states so that the state vector is reallocated.
|
||||
for (unsigned i = 0; i < 100; ++i)
|
||||
tg.new_state();
|
||||
spot::dotty_reachable(std::cout, &tg);
|
||||
}
|
||||
|
||||
int main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue