Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[standard_unit_filter] id = "" behaviour changed (GNA #22516) #1405

Closed
wesnoth-bugs opened this issue May 8, 2017 · 2 comments
Closed

[standard_unit_filter] id = "" behaviour changed (GNA #22516) #1405

wesnoth-bugs opened this issue May 8, 2017 · 2 comments
Labels
Bug Issues involving unexpected behavior. Confirmed Issues that have been successfully reproduced by at least one developer. WML Issues involving the WML engine or WML APIs.

Comments

@wesnoth-bugs
Copy link

Original submission by gfgtdf on 2014-08-24

in 1.13-dev the bahviour of unit filter has changed to that [filter] id # "" [/filter] which previously didn't match any unit now matches all units. this makes a difference sometimes esp when you say [filter] id "$myunit.id" [/filter] it previously didnt match any unit if myunit didn't exist. Now it macthes any unit. Is the new behaviour intended ?

(Reproduced on windows)
Release: 1.13.0-dev
Priority: 3 - Low
Severity: 3 - Normal

@wesnoth-bugs wesnoth-bugs added Bug Issues involving unexpected behavior. Confirmed Issues that have been successfully reproduced by at least one developer. Windows OS-specific issues that apply to Microsoft Windows labels May 8, 2017
@wesnoth-bugs
Copy link
Author

Modified on 2014-08-28

involution wrote:

I looked into this -- the code which I most recently posted to master about unit filters treats id="" the same as if the id field were blank. I didn't realize that it was important not to do that. I think all the fields of unit filter that take comma separated lists are affected, so not just ids, but also types, variations, abilities...

Ultimately it goes back to this line here:

https://github.com/wesnoth/wesnoth/blob/master/src/unit_filter.cpp#L107

I think I should be able to push a fix without much difficulty.

@wesnoth-bugs
Copy link
Author

Modified on 2016-08-24

zookeeper wrote:

This still seems to be an issue.

zookeeper changed status: None -> Confirmed

@Wedge009 Wedge009 added WML Issues involving the WML engine or WML APIs. and removed Windows OS-specific issues that apply to Microsoft Windows labels May 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues involving unexpected behavior. Confirmed Issues that have been successfully reproduced by at least one developer. WML Issues involving the WML engine or WML APIs.
Projects
None yet
Development

No branches or pull requests

2 participants