about summary refs log tree commit diff stats
path: root/033exclusive_container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-13 17:33:01 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-03-13 17:33:01 -0700
commitc432e73af0bef21dd8d830898ce0925da9915b18 (patch)
tree09a7d1e3725f5e7db343c27e90f814b54082474c /033exclusive_container.cc
parent63f0b139af78f1c43154c1ff637bc6985c239171 (diff)
downloadmu-c432e73af0bef21dd8d830898ce0925da9915b18.tar.gz
2769 - fix build_and_test_until 043space.cc
Diffstat (limited to '033exclusive_container.cc')
-rw-r--r--033exclusive_container.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/033exclusive_container.cc b/033exclusive_container.cc
index cc1922c2..18c07f3a 100644
--- a/033exclusive_container.cc
+++ b/033exclusive_container.cc
@@ -341,14 +341,14 @@ def main [
 //: Since the different variants of an exclusive-container might have
 //: different sizes, relax the size mismatch check for 'merge' instructions.
 :(before "End size_mismatch(x) Cases")
-if (current_instruction().operation == MERGE
+if (current_step_index() < SIZE(Current_routine->steps())
+    && current_instruction().operation == MERGE
     && !current_instruction().products.empty()
     && current_instruction().products.at(0).type) {
   reagent x = current_instruction().products.at(0);
   canonize(x);
-  if (get(Type, x.type->value).kind == EXCLUSIVE_CONTAINER) {
+  if (get(Type, x.type->value).kind == EXCLUSIVE_CONTAINER)
     return size_of(x) < SIZE(data);
-  }
 }
 
 :(scenario merge_exclusive_container_with_mismatched_sizes)