diff options
-rw-r--r-- | 020run.cc | 5 | ||||
-rw-r--r-- | 035lookup.cc | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/020run.cc b/020run.cc index 6a68e360..5d511d66 100644 --- a/020run.cc +++ b/020run.cc @@ -289,7 +289,10 @@ void write_memory(reagent/*copy*/ x, const vector<double>& data) { if (is_dummy(x)) return; if (is_literal(x)) return; // End Preprocess write_memory(x, data) - if (x.value == 0) return; + if (x.value == 0) { + raise << "can't write to location 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); + return; + } if (size_mismatch(x, data)) { raise << maybe(current_recipe_name()) << "size mismatch in storing to '" << x.original_string << "' (" << size_of(x) << " vs " << SIZE(data) << ") at '" << to_original_string(current_instruction()) << "'\n" << end(); return; diff --git a/035lookup.cc b/035lookup.cc index 0c9e1543..54dee6e3 100644 --- a/035lookup.cc +++ b/035lookup.cc @@ -56,10 +56,6 @@ def main [ :(before "End Preprocess write_memory(x, data)") canonize(x); -if (x.value == 0) { - raise << "can't write to location 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); - return; -} //: writes to address 0 always loudly fail :(scenario store_to_0_fails) |