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/029string | |
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/029string')
-rw-r--r-- | cpp/029string | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/029string b/cpp/029string index 9a1a094e..320337c4 100644 --- a/cpp/029string +++ b/cpp/029string @@ -58,13 +58,13 @@ Type_number["character"] = Next_type_number++; if (instructions[pc].ingredients[0].properties[0].second[0] == "literal-string") { // allocate an array just large enough for it vector<int> result; - result.push_back(Current_routine.alloc); + result.push_back(Current_routine->alloc); write_memory(instructions[pc].products[0], result); // assume that all characters fit in a single location //? cout << "new string literal: " << instructions[pc].ingredients[0].name << '\n'; //? 1 - Memory[Current_routine.alloc++] = instructions[pc].ingredients[0].name.size(); + Memory[Current_routine->alloc++] = instructions[pc].ingredients[0].name.size(); for (size_t i = 0; i < instructions[pc].ingredients[0].name.size(); ++i) { - Memory[Current_routine.alloc++] = instructions[pc].ingredients[0].name[i]; + Memory[Current_routine->alloc++] = instructions[pc].ingredients[0].name[i]; } // mu strings are not null-terminated in memory break; |