From 897d6fe41f14eadc0003bc2b76a8433b626b1557 Mon Sep 17 00:00:00 2001 From: Mataes Date: Tue, 7 Apr 2020 19:38:23 +0300 Subject: newstory: fixed utf in messages --- plugins/NewStory/src/history_array.h | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'plugins/NewStory/src/history_array.h') diff --git a/plugins/NewStory/src/history_array.h b/plugins/NewStory/src/history_array.h index 9410c686b2..53dea911a4 100644 --- a/plugins/NewStory/src/history_array.h +++ b/plugins/NewStory/src/history_array.h @@ -40,8 +40,7 @@ public: bool dbeOk = false; DBEVENTINFO dbe; - bool atext_del = false, wtext_del = false; - char* atext = 0; + bool wtext_del = false; wchar_t* wtext = 0; HANDLE data = 0; @@ -56,20 +55,6 @@ public: return load(mode); return true; } - inline wchar_t* getTBuf() - { - loadInline(ELM_DATA); -#ifdef UNICODE - return wtext; -#else - return atext; -#endif - } - inline char* getBuf() - { - loadInline(ELM_DATA); - return atext; - } inline wchar_t* getWBuf() { loadInline(ELM_DATA); @@ -98,12 +83,12 @@ public: EVENTTEXT = 0x080, EVENTONLY = 0x100, }; - Filter(WORD aFlags, wchar_t* aText) + Filter(WORD aFlags, wchar_t* wText) { refCount = new int(0); flags = aFlags; - text = new wchar_t[mir_wstrlen(aText) + 1]; - mir_wstrcpy(text, aText); + text = new wchar_t[mir_wstrlen(wText) + 1]; + mir_wstrcpy(text, wText); } Filter(const Filter& other) { @@ -158,7 +143,7 @@ public: } if (flags & (EVENTTEXT | EVENTONLY)) { item->loadInline(ELM_DATA); - return CheckFilter(item->getTBuf(), text); + return CheckFilter(item->getWBuf(), text); } return true; }; -- cgit v1.2.3