mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 07:22:53 +00:00
Fix [animate_unit]text= rejecting translatable strings (GNA25625)
This commit is contained in:
parent
9ff0137ca1
commit
e78f499a1c
@ -354,7 +354,7 @@ static int impl_add_animation(lua_State* L)
|
||||
map_location dest;
|
||||
int v1 = 0, v2 = 0;
|
||||
bool bars = false;
|
||||
std::string text;
|
||||
t_string text;
|
||||
color_t color{255, 255, 255};
|
||||
const_attack_ptr primary, secondary;
|
||||
|
||||
@ -395,6 +395,8 @@ static int impl_add_animation(lua_State* L)
|
||||
lua_getfield(L, 5, "text");
|
||||
if(lua_isstring(L, -1)) {
|
||||
text = lua_tostring(L, -1);
|
||||
} else if(luaW_totstring(L, -1, text)) {
|
||||
// Do nothing; luaW_totstring already assigned the value
|
||||
} else if(!lua_isnoneornil(L, -1)) {
|
||||
return luaW_type_error(L, -1, lua_typename(L, LUA_TSTRING));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user