Skip to content

Commit

Permalink
fix changed bahaviour of [filter]x="" [/filter]
Browse files Browse the repository at this point in the history
in 1.12 [filter]x="" [/filter] filter machtes no units while in 1.13. it maches all units, this was likely caused by a6decea, this commit should also fix #1992 where this behaviour change caused an infinite [while] loop in an addons wml code.
  • Loading branch information
gfgtdf committed Sep 14, 2017
1 parent 85b36d6 commit 905f1eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/units/filter.cpp
Expand Up @@ -55,7 +55,10 @@ struct unit_filter_xy : public unit_filter_base
std::string x = utils::interpolate_variables_into_string(x_, *(resources::gamedata));
std::string y = utils::interpolate_variables_into_string(y_, *(resources::gamedata));

if(x == "recall" && y == "recall") {
if(x.empty() && y.empty()) {
return false;
}
else if(x == "recall" && y == "recall") {
return !args.fc->get_disp_context().map().on_board(args.loc);
}
else {
Expand Down

0 comments on commit 905f1eb

Please sign in to comment.