about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-05-05 08:13:45 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-05-05 08:13:45 -0700
commitc2f7df5fe5b1167200ed53b661f2fbe4b1470ad4 (patch)
treed4d681658739e486b7e2d681d87f8d7fefdec16e
parentb8969ed81e75cb6d5c9a04b4bddb72e65d135fa3 (diff)
downloadmu-c2f7df5fe5b1167200ed53b661f2fbe4b1470ad4.tar.gz
2924
-rw-r--r--050scenario.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/050scenario.cc b/050scenario.cc
index 97974a0a..30002d77 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -78,7 +78,10 @@ scenario parse_scenario(istream& in) {
     raise << "duplicate scenario name: " << result.name << '\n' << end();
   Scenario_names.insert(result.name);
   skip_whitespace_and_comments(in);
-  assert(in.peek() == '[');
+  if (in.peek() != '[') {
+    raise << "Expected '[' after scenario " << result.name << '\n' << end();
+    exit(0);
+  }
   // scenarios are take special 'code' strings so we need to ignore brackets
   // inside comments
   result.to_run = slurp_quoted(in);