Fix bug #21967: fix crash when unit modification to traits has empty id

This commit is contained in:
David Mikos 2014-04-25 13:25:39 +09:30
parent de30bfcaed
commit 83836b1516
2 changed files with 4 additions and 2 deletions

View File

@ -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:

View File

@ -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;
}