diff options
Diffstat (limited to '060recipe.cc')
-rw-r--r-- | 060recipe.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/060recipe.cc b/060recipe.cc index d60badb6..b7d1e71f 100644 --- a/060recipe.cc +++ b/060recipe.cc @@ -64,6 +64,10 @@ case CALL: { trace("trace") << "indirect 'call': incrementing callstack depth to " << Trace_stream->callstack_depth << end(); assert(Trace_stream->callstack_depth < 9000); // 9998-101 plus cushion } + if (!ingredients.at(0).at(0)) { + raise << maybe(current_recipe_name()) << "tried to call empty recipe in '" << to_string(current_instruction()) << "'" << end(); + break; + } const instruction& caller_instruction = current_instruction(); Current_routine->calls.push_front(call(ingredients.at(0).at(0))); ingredients.erase(ingredients.begin()); // drop the callee |