- Scyther now reports a 1 exit code (error) when a scenario number is
selected that is too large.
This commit is contained in:
parent
472de3b526
commit
1ba63d16d4
11
src/main.c
11
src/main.c
@ -19,7 +19,7 @@
|
|||||||
* \section exit Exit codes
|
* \section exit Exit codes
|
||||||
*
|
*
|
||||||
* 0 Okay No attack found, claims encountered
|
* 0 Okay No attack found, claims encountered
|
||||||
* 1 Error Something went wrong (error)
|
* 1 Error Something went wrong (error) E.g. switch error, or scenario ran out.
|
||||||
* 2 Okay No attack found (because) no claims encountered
|
* 2 Okay No attack found (because) no claims encountered
|
||||||
* 3 Okay Attack found
|
* 3 Okay Attack found
|
||||||
*
|
*
|
||||||
@ -705,6 +705,15 @@ modelCheck (const System sys)
|
|||||||
{
|
{
|
||||||
graphDone (sys);
|
graphDone (sys);
|
||||||
}
|
}
|
||||||
|
if (sys->switchScenario > 0)
|
||||||
|
{
|
||||||
|
/* Traversing a scenario. Maybe we ran out. */
|
||||||
|
if (sys->switchScenario > sys->countScenario)
|
||||||
|
{
|
||||||
|
/* Signal as error */
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
}
|
||||||
return (sys->failed != STATES0);
|
return (sys->failed != STATES0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user