Fix #9651 Error in u:extract()

This logic seems inverted, this probably happened while the lua attributes were converted to use the LATTR_SETTER macros.
This commit is contained in:
gfgtdf 2024-12-16 23:22:38 +01:00 committed by Celtic Minstrel
parent e64283534f
commit f113b2b7a7

View file

@ -390,7 +390,7 @@ UNIT_GETTER("id", std::string) {
LATTR_SETTER("id", std::string, lua_unit*, lu) {
if(!lu->get()) return;
if(!lu->on_map()) luaL_argerror(L, 3, "can't modify id of on-map unit");
if(lu->on_map()) luaL_argerror(L, 3, "can't modify id of on-map unit");
(*lu)->set_id(value);
}