diff options
Diffstat (limited to '035call_ingredient.cc')
-rw-r--r-- | 035call_ingredient.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/035call_ingredient.cc b/035call_ingredient.cc index 599906da..a2dd97ad 100644 --- a/035call_ingredient.cc +++ b/035call_ingredient.cc @@ -39,6 +39,7 @@ Recipe_ordinal["next-ingredient"] = NEXT_INGREDIENT; case NEXT_INGREDIENT: { if (!ingredients.empty()) { raise << current_recipe_name() << ": 'next-ingredient' didn't expect any ingredients in '" << current_instruction().to_string() << "'\n" << end(); + products.resize(2); break; } assert(!Current_routine->calls.empty()); @@ -101,10 +102,12 @@ Recipe_ordinal["ingredient"] = INGREDIENT; case INGREDIENT: { if (SIZE(ingredients) != 1) { raise << current_recipe_name() << ": 'ingredient' expects exactly one ingredient, but got '" << current_instruction().to_string() << "'\n" << end(); + products.resize(2); break; } if (!is_literal(current_instruction().ingredients.at(0))) { raise << current_recipe_name() << ": 'ingredient' expects a literal ingredient, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); + products.resize(2); break; } assert(scalar(ingredients.at(0))); |