From ec2d0c98145867ab68ab844a469fc26b3da9f820 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 12 Jul 2012 15:59:42 +0000 Subject: fix for 4 clists appearing active on a clean profile git-svn-id: http://svn.miranda-ng.org/main/trunk@928 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/plugins/newplugins.cpp | 5 ++++- src/modules/plugins/pluginopts.cpp | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index 6b2eb6d63a..9712f01d07 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -524,7 +524,10 @@ static BOOL scanPluginsDir(WIN32_FIND_DATA *fd, TCHAR *path, WPARAM, LPARAM) void SetPluginOnWhiteList(const TCHAR* pluginname, int allow) { - DBWriteContactSettingByte(NULL, PLUGINDISABLELIST, StrConvA(pluginname), allow == 0); + char plugName[MAX_PATH]; + strncpy(plugName, StrConvA(pluginname), SIZEOF(plugName)); + strlwr(plugName); + DBWriteContactSettingByte(NULL, PLUGINDISABLELIST, plugName, allow == 0); } // returns 1 if the plugin should be enabled within this profile, filename is always lower case diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index 4bd86c69c7..45d8080d98 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -136,7 +136,9 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l static int uuidToString(const MUUID uuid, char *szStr, int cbLen) { - if (cbLen<1 || !szStr) return 0; + if (cbLen < 1 || !szStr) + return 0; + mir_snprintf(szStr, cbLen, "{%08x-%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]); return 1; -- cgit v1.2.3