diff options
Diffstat (limited to '057shape_shifting_container.cc')
-rw-r--r-- | 057shape_shifting_container.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/057shape_shifting_container.cc b/057shape_shifting_container.cc index 1a458bb7..04b5900f 100644 --- a/057shape_shifting_container.cc +++ b/057shape_shifting_container.cc @@ -94,8 +94,9 @@ void read_type_ingredients(string& name) { :(before "End insert_container Special-cases") // check for use of type ingredients -else if (is_type_ingredient_name(type->name)) { +else if (!type->name.empty() && is_type_ingredient_name(type->name)) { type->value = get(info.type_ingredient_names, type->name); + goto recurse; } :(code) bool is_type_ingredient_name(const string& type) { @@ -239,6 +240,7 @@ bool contains_type_ingredient(const reagent& x) { bool contains_type_ingredient(const type_tree* type) { if (!type) return false; if (type->value >= START_TYPE_INGREDIENTS) return true; + assert(!is_type_ingredient_name(type->name)); return contains_type_ingredient(type->left) || contains_type_ingredient(type->right); } |