Skip to content

Commit

Permalink
Schema: Fix [elseif] requiring an [then] tag
Browse files Browse the repository at this point in the history
While a lack of [then] here generally isn't desirable, a crash is far worse.
  • Loading branch information
CelticMinstrel committed Mar 31, 2018
1 parent e277b29 commit 59e6f28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/serialization/tag.cpp
Expand Up @@ -562,7 +562,7 @@ void class_tag::add_filter(const config& cond_cfg)
else_filter.add_child("not", elseif_filter);
// Ensure it won't match for any of the preceding cases, either
elseif_filter.append_children(old_else_filter);
conditions_.emplace_back(elseif_cfg.child("then"), elseif_filter);
conditions_.emplace_back(elseif_cfg.child_or_empty("then"), elseif_filter);
const std::string name = formatter() << get_name() << "[elseif " << i++ << "]";
conditions_.back().set_name(name);
}
Expand Down

0 comments on commit 59e6f28

Please sign in to comment.