From 18d523d8a413a56e291db07b7911305caa76d0ad Mon Sep 17 00:00:00 2001 From: ccremers Date: Fri, 22 Apr 2005 16:03:58 +0000 Subject: [PATCH] - Fixed segfault when modelchecker was called on an empty scenario. --- src/main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index bd9e1f4..f80bc00 100644 --- a/src/main.c +++ b/src/main.c @@ -104,8 +104,8 @@ main (int argc, char **argv) sys->argc = argc; sys->argv = argv; - process_switches(sys); - // exit (0); // TODO FIX weghalen [x][cc] + process_switches (sys); + // exit (0); // TODO FIX weghalen [x][cc] /* init compiler for this system */ compilerInit (sys); @@ -410,7 +410,7 @@ timersPrint (const System sys) { eprintf ("bounded_proof"); if (cl_scan->timebound) - eprintf ("\ttime=%i", get_time_limit()); + eprintf ("\ttime=%i", get_time_limit ()); } } } @@ -571,7 +571,10 @@ modelCheck (const System sys) switch (sys->engine) { case POR_ENGINE: - traverse (sys); + if (sys->maxruns > 0) + traverse (sys); + else + warning ("Model checking system with empty scenario."); break; case ARACHNE_ENGINE: arachne ();