about summary refs log tree commit diff stats
path: root/cpp/018address
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/018address')
-rw-r--r--cpp/018address3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/018address b/cpp/018address
index 33f62fc9..bb173f94 100644
--- a/cpp/018address
+++ b/cpp/018address
@@ -20,7 +20,8 @@ vector<int> read_memory(reagent x) {
   }
   x = canonize(x);
   int base = to_int(x.name);
-  for (size_t offset = 0; offset < Type[x.types[0]].size; ++offset) {
+  size_t size = size_of(x.types[0]);
+  for (size_t offset = 0; offset < size; ++offset) {
     int val = Memory[base+offset];
     trace("mem") << "location " << base+offset << " is " << val;
     result.push_back(val);