diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-01-27 05:45:48 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-01-27 05:45:48 -0800 |
commit | d30593c64b2e0cd364933853d74b2c2ed276a15d (patch) | |
tree | 5576faa0cacd5b010d540a2aace487cc1219dfc7 /056recipe_header.cc | |
parent | d009e158803956c76adbf8f58a62884c3e7affb3 (diff) | |
download | mu-d30593c64b2e0cd364933853d74b2c2ed276a15d.tar.gz |
2606 - fix crash
Thanks Caleb Couch.
Diffstat (limited to '056recipe_header.cc')
-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(); } |