diff options
author | George Hazan <ghazan@miranda.im> | 2021-05-20 17:33:42 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-05-20 17:33:42 +0300 |
commit | f679028cb4194b72efd4ebf27d5bb29341918957 (patch) | |
tree | d969988145d0677050137bbf1228345be5d319f3 | |
parent | 46be94cd275231bb124f2887878d5a78be5abf9a (diff) |
forgotten setlocale() calls
-rw-r--r-- | plugins/MirLua/src/Modules/m_json.cpp | 6 | ||||
-rw-r--r-- | plugins/MirLua/src/function_loader.cpp | 2 |
2 files changed, 0 insertions, 8 deletions
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)); |