diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-14 18:31:26 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-14 18:31:26 -0700 |
commit | 0edf822f996c5def4588cc207d1977cffc3e9a0c (patch) | |
tree | 275ee8b5c5f4e96f60f98fa74e546c3899bf9215 /cpp/013run | |
parent | e05847550c276debb831eb4853474b0da38614ef (diff) | |
download | mu-0edf822f996c5def4588cc207d1977cffc3e9a0c.tar.gz |
1062 - bugfix: wasn't aliasing Current_routine
You can't write tests for stupidity.
Diffstat (limited to 'cpp/013run')
-rw-r--r-- | cpp/013run | 5 |
1 files changed, 3 insertions, 2 deletions
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<instruction>& instructions = steps(rr); size_t& pc = running_at(rr); @@ -59,6 +59,7 @@ void run(routine rr) { } ++pc; } + Current_routine = NULL; } //: Some helpers. |