about summary refs log tree commit diff stats
path: root/082persist.cc
diff options
context:
space:
mode:
Diffstat (limited to '082persist.cc')
-rw-r--r--082persist.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/082persist.cc b/082persist.cc
index f10b44a2..3b0bb987 100644
--- a/082persist.cc
+++ b/082persist.cc
@@ -8,7 +8,6 @@ RESTORE,
 Recipe_ordinal["restore"] = RESTORE;
 :(before "End Primitive Recipe Implementations")
 case RESTORE: {
-  products.resize(1);
   if (SIZE(ingredients) != 1) {
     raise << current_recipe_name() << ": 'restore' requires exactly one ingredient, but got " << current_instruction().to_string() << '\n' << end();
     break;
@@ -26,6 +25,7 @@ case RESTORE: {
   }
   if (Current_scenario) break;  // do nothing in tests
   string contents = slurp("lesson/"+filename);
+  products.resize(1);
   if (contents.empty())
     products.at(0).push_back(0);
   else