about summary refs log tree commit diff stats
path: root/037call_reply.cc
diff options
context:
space:
mode:
Diffstat (limited to '037call_reply.cc')
-rw-r--r--037call_reply.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/037call_reply.cc b/037call_reply.cc
index a13c88e5..81f9c7c2 100644
--- a/037call_reply.cc
+++ b/037call_reply.cc
@@ -21,7 +21,8 @@ Recipe_number["reply"] = REPLY;
 case REPLY: {
   const instruction& reply_inst = current_instruction();  // save pointer into recipe before pop
   Current_routine->calls.pop();
-  assert(!Current_routine->calls.empty());
+  // just in case 'main' returns a value, drop it for now
+  if (Current_routine->calls.empty()) goto stop_running_current_routine;
   const instruction& caller_instruction = current_instruction();
   // make reply results available to caller
   copy(ingredients.begin(), ingredients.end(), inserter(products, products.begin()));