summaryrefslogtreecommitdiff
path: root/plugins/StopSpamMod
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-23 16:11:47 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-23 16:11:47 +0300
commit2b10bc5fbbb7f387faad2cc9d74d62abd8ff466c (patch)
tree210713539ed7f14382851108f491d79fecd9d94b /plugins/StopSpamMod
parentc086c2ec984431fad9575fedb6e681458e99e524 (diff)
fixes #1165 (StopSpam mod: crash on "stopspam.cpp (81): OnDbEventFilterAdd")
Diffstat (limited to 'plugins/StopSpamMod')
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp7
-rwxr-xr-xplugins/StopSpamMod/src/utilities.h2
-rwxr-xr-xplugins/StopSpamMod/src/version.h2
3 files changed, 7 insertions, 4 deletions
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index f6f586a5eb..3e1c95e655 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -59,9 +59,12 @@ std::string &GetProtoList()
return s = DBGetContactSettingStringPAN_A(NULL, pluginName, "protoList", "ICQ\r\n");
}
-bool ProtoInList(std::string proto)
+bool ProtoInList(const char *szProto)
{
- return std::string::npos != GetProtoList().find(proto + "\r\n");
+ if (szProto == nullptr)
+ return false;
+
+ return std::string::npos != GetProtoList().find(std::string(szProto) + "\r\n");
}
void DeleteCListGroupsByName(wchar_t* szGroupName)
diff --git a/plugins/StopSpamMod/src/utilities.h b/plugins/StopSpamMod/src/utilities.h
index 8d75c10905..f941823bd0 100755
--- a/plugins/StopSpamMod/src/utilities.h
+++ b/plugins/StopSpamMod/src/utilities.h
@@ -2,7 +2,7 @@ std::wstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModu
std::string DBGetContactSettingStringPAN_A(MCONTACT hContact, char const * szModule, char const * szSetting, std::string errorValue);
std::wstring &GetDlgItemString(HWND hwnd, int id);
std::string &GetProtoList();
-bool ProtoInList(std::string proto);
+bool ProtoInList(const char *szProto);
std::wstring variables_parse(std::wstring const &tstrFormat, MCONTACT hContact);
const int Stricmp(const wchar_t *str, const wchar_t *substr);
//const int Stristr(const wchar_t *str, const wchar_t *substr);
diff --git a/plugins/StopSpamMod/src/version.h b/plugins/StopSpamMod/src/version.h
index e3618e26aa..79bd0a807a 100755
--- a/plugins/StopSpamMod/src/version.h
+++ b/plugins/StopSpamMod/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 0
#define __RELEASE_NUM 2
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#include <stdver.h>