From 46363eef857b69761f1d6d28da5a53a954f76900 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sun, 20 May 2018 21:09:53 +0300 Subject: Revert "Merge branch 'master' of https://github.com/miranda-ng/miranda-ng" This reverts commit 3f90207479ee0a6530631812717801a54093658c, reversing changes made to 7d6b89fd45814936d0edeff664bf5efb2d19b875. --- plugins/MirLua/src/mlua_script.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/MirLua/src/mlua_script.cpp') diff --git a/plugins/MirLua/src/mlua_script.cpp b/plugins/MirLua/src/mlua_script.cpp index 976ed79688..9e4cc4ffbe 100644 --- a/plugins/MirLua/src/mlua_script.cpp +++ b/plugins/MirLua/src/mlua_script.cpp @@ -7,15 +7,15 @@ CMLuaScript::CMLuaScript(lua_State *L, const wchar_t *path) { mir_wstrcpy(filePath, path); - fileName = wcsrchr(filePath, L'\\') + 1; - const wchar_t *dot = wcsrchr(fileName, '.'); + fileName = wcsrchr(filePath, '\\') + 1; + wchar_t *dot = wcsrchr(fileName, '.'); size_t length = mir_wstrlen(fileName) - mir_wstrlen(dot) + 1; ptrW name((wchar_t*)mir_calloc(sizeof(wchar_t) * (length + 1))); mir_wstrncpy(name, fileName, length); - m_szModuleName = mir_utf8encodeW(name); + moduleName = mir_utf8encodeW(name); } CMLuaScript::CMLuaScript(const CMLuaScript &script) @@ -23,13 +23,13 @@ CMLuaScript::CMLuaScript(const CMLuaScript &script) { mir_wstrcpy(filePath, script.filePath); fileName = mir_wstrdup(script.fileName); - m_szModuleName = mir_strdup(script.m_szModuleName); + moduleName = mir_strdup(script.moduleName); } CMLuaScript::~CMLuaScript() { Unload(); - mir_free((char*)m_szModuleName); + mir_free(moduleName); } const wchar_t* CMLuaScript::GetFilePath() const @@ -82,11 +82,11 @@ bool CMLuaScript::Load() return true; luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); - lua_getfield(L, -1, m_szModuleName); + lua_getfield(L, -1, moduleName); if (!lua_toboolean(L, -1)) { lua_pop(L, 1); lua_pushvalue(L, -2); - lua_setfield(L, -2, m_szModuleName); + lua_setfield(L, -2, moduleName); lua_pop(L, 1); } else @@ -126,7 +126,7 @@ void CMLuaScript::Unload() luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); lua_pushnil(L); - lua_setfield(L, -2, m_szModuleName); + lua_setfield(L, -2, moduleName); lua_pop(L, 1); } -- cgit v1.2.3