mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 12:05:29 +00:00
Fix bug #21967: fix crash when unit modification to traits has empty id
This commit is contained in:
parent
de30bfcaed
commit
83836b1516
@ -112,6 +112,7 @@ Version 1.13.0-dev:
|
||||
* Fix bug #21931: controllers bugged in (basic campaign) when networked
|
||||
* Fix bug #21883: make sure movement animations don't cycle with fog on
|
||||
* Fix bug #21316: make subframes within standing animations cycle by default
|
||||
* Fix bug #21967: fix crash when unit modification to traits has empty id
|
||||
|
||||
Version 1.11.11:
|
||||
* Add-ons server:
|
||||
|
@ -755,8 +755,9 @@ std::vector<std::string> unit::get_traits_list() const
|
||||
BOOST_FOREACH(const config &mod, modifications_.child_range("trait"))
|
||||
{
|
||||
std::string const &id = mod["id"];
|
||||
if (!id.empty())
|
||||
res.push_back(id);
|
||||
// Make sure to return empty id trait strings as otherwise
|
||||
// names will not match in length (Bug #21967)
|
||||
res.push_back(id);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user