scc_info: detect incorrect initial state
* spot/twaalgos/sccinfo.cc: Here. * tests/python/sccinfo.py: Test it.
This commit is contained in:
parent
31ccab026b
commit
904cfb27fa
2 changed files with 11 additions and 0 deletions
|
|
@ -75,6 +75,11 @@ namespace spot
|
|||
options_(options)
|
||||
{
|
||||
unsigned n = aut->num_states();
|
||||
|
||||
if (initial_state != -1U && n <= initial_state)
|
||||
throw std::runtime_error
|
||||
("scc_info: supplied initial state does not exist");
|
||||
|
||||
sccof_.resize(n, -1U);
|
||||
|
||||
if (!!(options & scc_info_options::TRACK_STATES_IF_FIN_USED)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue