diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-29 18:40:36 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-29 18:40:36 -0700 |
commit | 89b87bc7c493670ecb598784e1073a09f691d43e (patch) | |
tree | b645853bb524a9a57a897a729269786aad8c4ce6 /029tools.cc | |
parent | 9570363aec35e187e2395b1760a4b94e71580ac9 (diff) | |
download | mu-89b87bc7c493670ecb598784e1073a09f691d43e.tar.gz |
1886 - gracefully handle malformed ingredients
For example: x:number <- index y:address:array:number, 3 (forgetting to do a lookup) Thanks Caleb Couch.
Diffstat (limited to '029tools.cc')
-rw-r--r-- | 029tools.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/029tools.cc b/029tools.cc index 9e25f16f..cd4123fa 100644 --- a/029tools.cc +++ b/029tools.cc @@ -182,11 +182,11 @@ _SYSTEM, Recipe_ordinal["$system"] = _SYSTEM; :(before "End Primitive Recipe Implementations") case _SYSTEM: { + products.resize(1); if (current_instruction().ingredients.empty()) { raise << current_recipe_name() << ": '$system' requires exactly one ingredient, but got none\n" << end(); break; } - products.resize(1); int status = system(current_instruction().ingredients.at(0).name.c_str()); products.at(0).push_back(status); break; |