about summary refs log tree commit diff stats
path: root/045space_surround.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-26 20:00:38 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-26 20:02:18 -0700
commitae256ea13efc77cc767a658c6f61b12cd7461e21 (patch)
tree18dbcb26423b1d17d0639995c4bd29ec8f3d5c17 /045space_surround.cc
parent7bba6e7bb7fd7bfdfc71626a34a08cb96a084b74 (diff)
downloadmu-ae256ea13efc77cc767a658c6f61b12cd7461e21.tar.gz
2283 - represent each /property as a tree
Diffstat (limited to '045space_surround.cc')
-rw-r--r--045space_surround.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/045space_surround.cc b/045space_surround.cc
index a29ad67c..b55c5e04 100644
--- a/045space_surround.cc
+++ b/045space_surround.cc
@@ -41,9 +41,9 @@ long long int space_base(const reagent& x, long long int space_index, long long
 long long int space_index(const reagent& x) {
   for (long long int i = /*skip name:type*/1; i < SIZE(x.properties); ++i) {
     if (x.properties.at(i).first == "space") {
-      if (SIZE(x.properties.at(i).second) != 1)
+      if (!x.properties.at(i).second || x.properties.at(i).second->right)
         raise_error << maybe(current_recipe_name()) << "/space metadata should take exactly one value in " << x.original_string << '\n' << end();
-      return to_integer(x.properties.at(i).second.at(0));
+      return to_integer(x.properties.at(i).second->value);
     }
   }
   return 0;