mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 03:45:08 +00:00
Crash in attack_type::matches_filter - impl_unit_attack_match in some scenarios.
This commit is contained in:
parent
e16e4baf79
commit
2c154b580d
@ -319,6 +319,9 @@ static int impl_unit_attack_match(lua_State* L)
|
||||
{
|
||||
const_attack_ptr atk = luaW_toweapon(L, 1);
|
||||
config cfg = luaW_checkconfig(L, 2);
|
||||
if(!atk) {
|
||||
return luaL_argerror(L, 1, "invalid attack");
|
||||
}
|
||||
lua_pushboolean(L, atk->matches_filter(cfg));
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user