Skip to content

Commit

Permalink
Fix Lua name generator API not accepting translatable strings
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Feb 20, 2021
1 parent 1cbd2b6 commit 3e896ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripting/lua_kernel_base.cpp
Expand Up @@ -226,7 +226,7 @@ static int intf_name_generator(lua_State *L)
if(lua_istable(L, 2)) {
input = lua_check<std::vector<std::string>>(L, 2);
} else {
input = utils::parenthetical_split(luaL_checkstring(L, 2), ',');
input = utils::parenthetical_split(luaW_checktstring(L, 2), ',');
}
int chain_sz = luaL_optinteger(L, 3, 2);
int max_len = luaL_optinteger(L, 4, 12);
Expand Down Expand Up @@ -254,7 +254,7 @@ static int intf_name_generator(lua_State *L)
gen = new(L) context_free_grammar_generator(data);
}
} else {
gen = new(L) context_free_grammar_generator(luaL_checkstring(L, 2));
gen = new(L) context_free_grammar_generator(luaW_checktstring(L, 2));
}
if(gen) {
assert(static_cast<void*>(gen) == dynamic_cast<context_free_grammar_generator*>(gen));
Expand Down

0 comments on commit 3e896ba

Please sign in to comment.