diff options
Diffstat (limited to 'plugins/MirLua/src/mlua_script.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua_script.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/MirLua/src/mlua_script.cpp b/plugins/MirLua/src/mlua_script.cpp index 39b7bbf9e0..9a0d840c0c 100644 --- a/plugins/MirLua/src/mlua_script.cpp +++ b/plugins/MirLua/src/mlua_script.cpp @@ -28,18 +28,18 @@ CMLuaScript::~CMLuaScript() bool CMLuaScript::GetScriptEnviroment(lua_State *L)
{
- lua_Debug ar; - if (lua_getstack(L, 1, &ar) == 0 || lua_getinfo(L, "f", &ar) == 0 || lua_iscfunction(L, -1)) - { - lua_pop(L, 1); + lua_Debug ar;
+ if (lua_getstack(L, 1, &ar) == 0 || lua_getinfo(L, "f", &ar) == 0 || lua_iscfunction(L, -1))
+ {
+ lua_pop(L, 1);
return false;
}
- const char *env = lua_getupvalue(L, -1, 1); - if (!env || mir_strcmp(env, "_ENV") != 0) - { - lua_pop(L, 1); - return false; + const char *env = lua_getupvalue(L, -1, 1);
+ if (!env || mir_strcmp(env, "_ENV") != 0)
+ {
+ lua_pop(L, 1);
+ return false;
}
return true;
@@ -47,8 +47,8 @@ bool CMLuaScript::GetScriptEnviroment(lua_State *L) CMLuaScript* CMLuaScript::GetScriptFromEnviroment(lua_State *L)
{
- if (!GetScriptEnviroment(L)) - return NULL; + if (!GetScriptEnviroment(L))
+ return NULL;
lua_getfield(L, -1, SCRIPT);
CMLuaScript *script = (CMLuaScript*)lua_touserdata(L, -1);
@@ -63,7 +63,7 @@ int CMLuaScript::GetScriptIdFromEnviroment(lua_State *L) if (script != NULL)
return script->id;
- return hLangpack;
+ return hMLuaLangpack;
}
const char* CMLuaScript::GetModuleName() const
|