From f679028cb4194b72efd4ebf27d5bb29341918957 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 20 May 2021 17:33:42 +0300 Subject: forgotten setlocale() calls --- plugins/MirLua/src/Modules/m_json.cpp | 6 ------ plugins/MirLua/src/function_loader.cpp | 2 -- 2 files changed, 8 deletions(-) (limited to 'plugins/MirLua/src') diff --git a/plugins/MirLua/src/Modules/m_json.cpp b/plugins/MirLua/src/Modules/m_json.cpp index 35a6eb1ba9..78b46eece4 100644 --- a/plugins/MirLua/src/Modules/m_json.cpp +++ b/plugins/MirLua/src/Modules/m_json.cpp @@ -142,8 +142,6 @@ static int json__pairsIterator(lua_State *L) JSONNode *node = *(JSONNode**)luaL_checkudata(L, 1, MT_JSON); int i = lua_tointeger(L, lua_upvalueindex(1)); - setlocale(LC_NUMERIC, "C"); - if (i < node->size()) { JSONNode *child = json_at(node, i); if (json_type(node) == JSON_ARRAY) @@ -152,17 +150,13 @@ static int json__pairsIterator(lua_State *L) lua_pushstring(L, child->name()); json2lua(L, *child); - setlocale(LC_NUMERIC, ""); lua_pushinteger(L, (i + 1)); lua_replace(L, lua_upvalueindex(1)); - return 2; } - setlocale(LC_NUMERIC, ""); lua_pushnil(L); - return 1; } diff --git a/plugins/MirLua/src/function_loader.cpp b/plugins/MirLua/src/function_loader.cpp index c63e3b54fe..1cee7df0bf 100644 --- a/plugins/MirLua/src/function_loader.cpp +++ b/plugins/MirLua/src/function_loader.cpp @@ -19,9 +19,7 @@ static int mlua_print(lua_State *L) data.AppendFormat("%s", lua_toboolean(L, i) ? "true" : "false"); break; case LUA_TNUMBER: - setlocale(LC_NUMERIC, "C"); data.Append(lua_tostring(L, i)); - setlocale(LC_NUMERIC, ""); break; case LUA_TSTRING: data.AppendFormat("'%s'", lua_tostring(L, i)); -- cgit v1.2.3