about summary refs log tree commit diff stats
path: root/cpp/010vm
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-03 10:33:17 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-03 10:33:17 -0700
commitc027f09219b56aec206c63e981209b6423a5a9a5 (patch)
treea66fa5ee2ccb0ff212921057e5499ff0c861fde4 /cpp/010vm
parent3ae7e543047fe4351a5421519de277052a2bc240 (diff)
downloadmu-c027f09219b56aec206c63e981209b6423a5a9a5.tar.gz
1007
Diffstat (limited to 'cpp/010vm')
-rw-r--r--cpp/010vm7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/010vm b/cpp/010vm
index 39159e40..8363720c 100644
--- a/cpp/010vm
+++ b/cpp/010vm
@@ -173,7 +173,12 @@ void setup_recipes() {
       properties[0].second.push_back("literal-string");
     }
   }
-  reagent::reagent() :value(0), initialized(false) {}
+  reagent::reagent() :value(0), initialized(false) {
+    // The first property is special, so ensure we always have it.
+    // Other properties can be pushed back, but the first must always be
+    // assigned to.
+    properties.push_back(pair<string, vector<string> >("", vector<string>()));
+  }
   string reagent::to_string() {
     ostringstream out;
     out << "{name: \"" << name << "\", value: " << value << ", type: ";