diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-10-28 21:31:28 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-10-28 21:31:28 +0000 |
commit | e024a13a4d7b35e9065bdf0cde5c3770bbe43ee0 (patch) | |
tree | 8a755ac04ddd99a162e92f9feb6c3a2b7e131156 /plugins/MirLua/src/m_genmenu.cpp | |
parent | 679b23b4d1c5b2d935085b199d9327bec8477378 (diff) |
MirLua: removed own guid parser
git-svn-id: http://svn.miranda-ng.org/main/trunk@15642 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/m_genmenu.cpp')
-rw-r--r-- | plugins/MirLua/src/m_genmenu.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp index 09b64bbc65..1c729c43c9 100644 --- a/plugins/MirLua/src/m_genmenu.cpp +++ b/plugins/MirLua/src/m_genmenu.cpp @@ -15,15 +15,8 @@ void MakeMenuItem(lua_State *L, CMenuItem &mi) lua_pushliteral(L, "Uid");
lua_gettable(L, -2);
const char* uuid = (char*)lua_tostring(L, -1);
- if (uuid)
- {
- unsigned long a;
- unsigned short b, c;
- unsigned char d[8];
- if (sscanf_s(uuid, "{%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX}",
- &a, &b, &c, &d[0], &d[1], &d[2], &d[3], &d[4], &d[5], &d[6], &d[7]) == 11)
- SET_UID(mi, a, b, c, d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7]);
- }
+ if (CLSIDFromString((LPCOLESTR)ptrT(mir_utf8decodeT(uuid)), (LPCLSID)&mi.uid) != NOERROR)
+ UNSET_UID(mi);
lua_pop(L, 1);
lua_pushliteral(L, "Name");
|