diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-10-26 20:55:17 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-10-26 20:55:17 +0000 |
commit | 392ce637b128246eba3d4ecd69598445c3ce5057 (patch) | |
tree | e80c9895713af709a1def91e97d717bc815ca33f /plugins/MirLua/src/m_core.cpp | |
parent | db06ea9ec3e0df797b3b1aab25be70b325cbd8cf (diff) |
MirLua: fix previous commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@15622 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/m_core.cpp')
-rw-r--r-- | plugins/MirLua/src/m_core.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp index 698eacffa3..48e54dd8c6 100644 --- a/plugins/MirLua/src/m_core.cpp +++ b/plugins/MirLua/src/m_core.cpp @@ -179,15 +179,13 @@ static int lua_CallService(lua_State *L) static int lua_IsPluginLoaded(lua_State *L)
{
- const char *value = luaL_checkstring(L, 1);
+ const char *value = lua_tostring(L, 1);
MUUID uuid = { 0 };
int res = sscanf_s(value, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
- &uuid.a, &uuid.b, &uuid.c, &uuid.d[0], &uuid.d[1], &uuid.d[2], &uuid.d[3], &uuid.d[4], &uuid.d[5], &uuid.d[6], &uuid.d[7]);
- if (res == 11)
- {
+ &uuid.a, &uuid.b, &uuid.c, &uuid.d[0], &uuid.d[1], &uuid.d[2], &uuid.d[3], &uuid.d[4], &uuid.d[5], &uuid.d[6], &uuid.d[7]) == 11;
+ if (res == TRUE)
res = ::IsPluginLoaded(uuid);
- }
lua_pushboolean(L, res);
return 1;
|