diff options
-rw-r--r-- | 056recipe_header.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/056recipe_header.cc b/056recipe_header.cc index df4ebdc9..130f832e 100644 --- a/056recipe_header.cc +++ b/056recipe_header.cc @@ -290,7 +290,7 @@ void check_reply_instructions_against_header(const recipe_ordinal r) { for (long long int i = 0; i < SIZE(caller_recipe.steps); ++i) { const instruction& inst = caller_recipe.steps.at(i); if (inst.name != "reply") continue; - for (long long int i = 0; i < SIZE(inst.ingredients); ++i) { + for (long long int i = 0; i < min(SIZE(caller_recipe.products), SIZE(inst.ingredients)); ++i) { if (!types_match(caller_recipe.products.at(i), inst.ingredients.at(i))) raise_error << maybe(caller_recipe.name) << "replied with the wrong type at '" << inst.to_string() << "'\n" << end(); } |