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/010vm5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/010vm b/cpp/010vm
index 049630d3..8bb1604b 100644
--- a/cpp/010vm
+++ b/cpp/010vm
@@ -139,7 +139,7 @@ void setup_recipes() {
   void instruction::clear() { is_label=false; label.clear(); operation=IDLE; ingredients.clear(); products.clear(); }
 
   // Reagents have the form <name>:<type>:<type>:.../<property>/<property>/...
-  reagent::reagent(string s) {
+  reagent::reagent(string s) :value(0) {
     istringstream in(s);
     // properties
     while (!in.eof()) {
@@ -152,12 +152,11 @@ void setup_recipes() {
     }
     // structures for the first row of properties
     name = properties[0].first;
-    value = to_int(name);
     for (size_t i = 0; i < properties[0].second.size(); ++i) {
       types.push_back(Type_number[properties[0].second[i]]);
     }
   }
-  reagent::reagent(type_number t) {
+  reagent::reagent(type_number t) :value(0) {
     types.push_back(t);
   }
   string reagent::to_string() {
#n151'>151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194