about summary refs log tree commit diff stats
path: root/cpp/010vm
diff options
context:
space:
mode:
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: ";