mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Move setlocale
from Lua to C++.
This commit is contained in:
parent
0e4c467a82
commit
1e94a7feaf
3 changed files with 4 additions and 4 deletions
|
@ -118,6 +118,9 @@ ScriptApiBase::ScriptApiBase(ScriptingType type):
|
|||
|
||||
lua_pushstring(m_luastack, porting::getPlatformName());
|
||||
lua_setglobal(m_luastack, "PLATFORM");
|
||||
|
||||
// Make sure Lua uses the right locale
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
}
|
||||
|
||||
ScriptApiBase::~ScriptApiBase()
|
||||
|
|
|
@ -261,8 +261,7 @@ void ScriptApiSecurity::initializeSecurityClient()
|
|||
"clock",
|
||||
"date",
|
||||
"difftime",
|
||||
"time",
|
||||
"setlocale",
|
||||
"time"
|
||||
};
|
||||
static const char *debug_whitelist[] = {
|
||||
"getinfo",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue