From 0d7b60ed1dd71d48777b86d01849767f69fd2511 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 24 Apr 2015 20:49:53 -0700 Subject: 1178 --- cpp/037call_reply | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cpp/037call_reply') 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; } -- cgit 1.4.1-2-gfad0