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: ";
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65














                                                                       














                                                            
                                                       


                                               
                                                         






                                         






















                                                                         
95'>195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241