summaryrefslogtreecommitdiff
path: root/plugins/StopSpamPlus/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/StopSpamPlus/src/utils.cpp')
-rw-r--r--plugins/StopSpamPlus/src/utils.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/StopSpamPlus/src/utils.cpp b/plugins/StopSpamPlus/src/utils.cpp
index a71e829d24..6fb2233318 100644
--- a/plugins/StopSpamPlus/src/utils.cpp
+++ b/plugins/StopSpamPlus/src/utils.cpp
@@ -34,14 +34,13 @@ bool IsExistMyMessage(MCONTACT hContact)
tstring variables_parse(const wchar_t *tstrFormat, MCONTACT hContact)
{
if (ServiceExists(MS_VARS_FORMATSTRING)) {
- FORMATINFO fi;
- memset(&fi, 0, sizeof(fi));
+ FORMATINFO fi = {};
fi.cbSize = sizeof(fi);
- fi.tszFormat = wcsdup(tstrFormat);
+ fi.szFormat.w = wcsdup(tstrFormat);
fi.hContact = hContact;
- fi.flags |= FIF_TCHAR;
- wchar_t *tszParsed = (wchar_t *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
- free(fi.tszFormat);
+ fi.flags = FIF_UNICODE;
+ wchar_t *tszParsed = (wchar_t*)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+ free(fi.szFormat.w);
if (tszParsed) {
tstring tstrResult = tszParsed;
mir_free(tszParsed);