about summary refs log tree commit diff stats
path: root/subx/010core.cc
diff options
context:
space:
mode:
Diffstat (limited to 'subx/010core.cc')
-rw-r--r--subx/010core.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/subx/010core.cc b/subx/010core.cc
index 07029ff0..90359162 100644
--- a/subx/010core.cc
+++ b/subx/010core.cc
@@ -172,6 +172,7 @@ void load_program(istream& in, uint32_t addr) {
     Mem.at(addr) = to_byte(c1, c2);
     trace(99, "load") << addr << " -> " << HEXBYTE << NUM(Mem.at(addr)) << end();
     addr++;
+    if (addr >= Mem.size()) Mem.resize(Mem.size()*2);
   }
   End_of_program = addr;
 }