about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-01 18:24:17 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-01 18:24:17 -0800
commit0db6341f8448154e10fb6728ec03cb019af84b9e (patch)
tree31213ea5e50bd542ca8191e884a24fb2e65b1ced
parented09f7384ad87e87e1035b948c7f88841570f292 (diff)
downloadmu-0db6341f8448154e10fb6728ec03cb019af84b9e.tar.gz
2340
-rw-r--r--030container.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/030container.cc b/030container.cc
index 624648b7..1bece91d 100644
--- a/030container.cc
+++ b/030container.cc
@@ -144,15 +144,13 @@ case GET: {
     break;
   }
   long long int offset_value = 0;
-  if (is_integer(offset.name)) {  // later layers permit non-integer offsets
+  if (is_integer(offset.name))  // later layers permit non-integer offsets
     offset_value = to_integer(offset.name);
-    if (offset_value < 0 || offset_value >= SIZE(Type[base_type].elements)) {
-      raise_error << maybe(Recipe[r].name) << "invalid offset " << offset_value << " for " << Type[base_type].name << '\n' << end();
-      break;
-    }
-  }
-  else {
+  else
     offset_value = offset.value;
+  if (offset_value < 0 || offset_value >= SIZE(Type[base_type].elements)) {
+    raise_error << maybe(Recipe[r].name) << "invalid offset " << offset_value << " for " << Type[base_type].name << '\n' << end();
+    break;
   }
   reagent product = inst.products.at(0);
   // Update GET product in Check