about summary refs log tree commit diff stats
path: root/037call_reply.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-07 18:35:33 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-07 19:05:23 -0700
commit9d670bb58f8841791d7531946601658cedd20229 (patch)
tree32ca741f5ef6fff0d892be0d0ea51475d41af085 /037call_reply.cc
parentbc4db811c4aef5fce4a0df66bd53fea24c2f70f9 (diff)
downloadmu-9d670bb58f8841791d7531946601658cedd20229.tar.gz
1301 - back to the chessboard
Still need a nice syntax for managing the routine under test.
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()));