mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-18 04:55:20 +01:00
Move setlocale from Lua to C++.
This commit is contained in:
@@ -119,6 +119,9 @@ ScriptApiBase::ScriptApiBase() :
|
||||
|
||||
m_environment = NULL;
|
||||
m_guiengine = NULL;
|
||||
|
||||
// Make sure Lua uses the right locale
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
}
|
||||
|
||||
ScriptApiBase::~ScriptApiBase()
|
||||
|
||||
@@ -249,9 +249,8 @@ void ScriptApiSecurity::initializeSecurityClient()
|
||||
static const char *os_whitelist[] = {
|
||||
"clock",
|
||||
"date",
|
||||
"difftime",
|
||||
"time",
|
||||
"setlocale",
|
||||
"difftime",
|
||||
"time"
|
||||
};
|
||||
static const char *debug_whitelist[] = {
|
||||
"getinfo",
|
||||
|
||||
Reference in New Issue
Block a user