From 1ba63d16d4d5c77bce1815ea5b0ee4fd5c82d852 Mon Sep 17 00:00:00 2001 From: ccremers Date: Wed, 28 Jul 2004 12:03:42 +0000 Subject: [PATCH] - Scyther now reports a 1 exit code (error) when a scenario number is selected that is too large. --- src/main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 5590482..e705d1e 100644 --- a/src/main.c +++ b/src/main.c @@ -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); }