- Scyther now reports a 1 exit code (error) when a scenario number is

selected that is too large.
This commit is contained in:
ccremers 2004-07-28 12:03:42 +00:00
parent 472de3b526
commit 1ba63d16d4

View File

@ -19,7 +19,7 @@
* \section exit Exit codes
*
* 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
* 3 Okay Attack found
*
@ -705,6 +705,15 @@ modelCheck (const System 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);
}