From ae256ea13efc77cc767a658c6f61b12cd7461e21 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 26 Oct 2015 20:00:38 -0700 Subject: 2283 - represent each /property as a tree --- 045space_surround.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '045space_surround.cc') 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; -- cgit 1.4.1-2-gfad0