diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-23 16:11:47 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-23 16:11:47 +0300 |
commit | 2b10bc5fbbb7f387faad2cc9d74d62abd8ff466c (patch) | |
tree | 210713539ed7f14382851108f491d79fecd9d94b /plugins/StopSpamMod/src/utilities.cpp | |
parent | c086c2ec984431fad9575fedb6e681458e99e524 (diff) |
fixes #1165 (StopSpam mod: crash on "stopspam.cpp (81): OnDbEventFilterAdd")
Diffstat (limited to 'plugins/StopSpamMod/src/utilities.cpp')
-rwxr-xr-x | plugins/StopSpamMod/src/utilities.cpp | 7 |
1 files changed, 5 insertions, 2 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)
|