From c6f59d75142b7568dd89f5cff691b0b58030aafd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Sep 2023 13:41:55 +0300 Subject: SmileyAdd: fix for the obsolete quirks in SmaileyAdd API --- plugins/TipperYM/src/mir_smileys.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'plugins/TipperYM/src') diff --git a/plugins/TipperYM/src/mir_smileys.cpp b/plugins/TipperYM/src/mir_smileys.cpp index 1d7544eeda..72c6369148 100644 --- a/plugins/TipperYM/src/mir_smileys.cpp +++ b/plugins/TipperYM/src/mir_smileys.cpp @@ -27,7 +27,6 @@ int InitTipperSmileys() // Register smiley category if (ServiceExists(MS_SMILEYADD_REGISTERCATEGORY)) { SMADD_REGCAT rc; - rc.cbSize = sizeof(rc); rc.name = "tipper"; rc.dispname = Translate("Tipper smileys"); CallService(MS_SMILEYADD_REGISTERCATEGORY, 0, (LPARAM)&rc); @@ -322,13 +321,12 @@ SortedList *ReplaceSmileys(const wchar_t *text, int text_size, const char *proto strncpy(smileyProto, protocol, sizeof(smileyProto) - 1); // Parse it! - SMADD_BATCHPARSE2 sp = { 0 }; - sp.cbSize = sizeof(sp); - sp.str = (wchar_t *)text; - sp.flag = SAFL_TCHAR; + SMADD_BATCHPARSE sp = {}; + sp.str.w = text; + sp.flag = SAFL_UNICODE; sp.Protocolname = (opt.iSmileyAddFlags & SMILEYADD_USEPROTO) ? smileyProto : "tipper"; - SMADD_BATCHPARSERES *spres = (SMADD_BATCHPARSERES *)CallService(MS_SMILEYADD_BATCHPARSE, 0, (LPARAM)&sp); + SMADD_BATCHPARSERES *spres = (SMADD_BATCHPARSERES *)CallService(MS_SMILEYADD_BATCHPARSE, 0, (LPARAM)&sp); if (!spres) // Did not find a smiley return nullptr; -- cgit v1.2.3