core.print = nil -- don't pollute our namespace
end
math.randomseed(os.time())
-os.setlocale("C", "numeric")
minetest = core
-- Load other files
elseif INIT == "async" then
dofile(asyncpath .. "init.lua")
elseif INIT == "client" then
- os.setlocale = nil
dofile(clientpath .. "init.lua")
else
error(("Unrecognized builtin initialization type %s!"):format(tostring(INIT)))
lua_pushstring(m_luastack, porting::getPlatformName());
lua_setglobal(m_luastack, "PLATFORM");
+
+ // Make sure Lua uses the right locale
+ setlocale(LC_NUMERIC, "C");
}
ScriptApiBase::~ScriptApiBase()