From 0edf822f996c5def4588cc207d1977cffc3e9a0c Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 14 Apr 2015 18:31:26 -0700 Subject: 1062 - bugfix: wasn't aliasing Current_routine You can't write tests for stupidity. --- cpp/013run | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpp/013run') diff --git a/cpp/013run b/cpp/013run index 5ba9af70..1606a82d 100644 --- a/cpp/013run +++ b/cpp/013run @@ -27,7 +27,7 @@ struct routine { }; :(before "End Globals") -routine Current_routine(0); +routine* Current_routine = NULL; :(code) void run(recipe_number r) { @@ -35,7 +35,7 @@ void run(recipe_number r) { } void run(routine rr) { - Current_routine = rr; + Current_routine = &rr; while (!done(rr)) { vector& instructions = steps(rr); size_t& pc = running_at(rr); @@ -59,6 +59,7 @@ void run(routine rr) { } ++pc; } + Current_routine = NULL; } //: Some helpers. -- cgit 1.4.1-2-gfad0