about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/037call_reply5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/037call_reply b/cpp/037call_reply
index adf75c7e..d48a17de 100644
--- a/cpp/037call_reply
+++ b/cpp/037call_reply
@@ -27,14 +27,13 @@ case REPLY: {
   }
   Current_routine->calls.pop();
   assert(!Current_routine->calls.empty());
-  size_t& caller_pc = Current_routine->calls.top().running_step_index;
-  instruction& caller_instruction = Recipe[Current_routine->calls.top().running_recipe].steps[caller_pc];
+  const instruction& caller_instruction = current_instruction();
   assert(caller_instruction.products.size() <= callee_results.size());
   for (size_t i = 0; i < caller_instruction.products.size(); ++i) {
     trace("run") << "result " << i << " is " << to_string(callee_results[i]);
     write_memory(caller_instruction.products[i], callee_results[i]);
   }
-  ++caller_pc;
+  ++current_step_index();  // caller
   break;
 }