about summary refs log tree commit diff stats
path: root/cpp/029string
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-05 19:18:32 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-05 19:18:32 -0700
commitc17d559155b3f666a729d6380d9b8236f67bc481 (patch)
tree51ffe10736da978e80b117a971a4e38b5ccdfa3f /cpp/029string
parent267ebb590b0a08d6e8bc9e3f8644b491d0d790ac (diff)
downloadmu-c17d559155b3f666a729d6380d9b8236f67bc481.tar.gz
1019 - stupid error in 'new'
Diffstat (limited to 'cpp/029string')
-rw-r--r--cpp/029string3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/029string b/cpp/029string
index 6778a3c4..9a1a094e 100644
--- a/cpp/029string
+++ b/cpp/029string
@@ -61,7 +61,8 @@ if (instructions[pc].ingredients[0].properties[0].second[0] == "literal-string")
   result.push_back(Current_routine.alloc);
   write_memory(instructions[pc].products[0], result);
   // assume that all characters fit in a single location
-  Memory[Current_routine.alloc++] = instructions[0].name.size();
+//?   cout << "new string literal: " << instructions[pc].ingredients[0].name << '\n'; //? 1
+  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];
   }