From 3187428bb2f7b929e31ebf64b1e21d9c0fbc4f2b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 10 Aug 2023 12:02:31 +0300 Subject: NewStory: memory leak fix + small quirks fixed --- libs/mTextControl/src/fancy_rtf.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libs/mTextControl/src') diff --git a/libs/mTextControl/src/fancy_rtf.cpp b/libs/mTextControl/src/fancy_rtf.cpp index d7beb7000c..7c82bad0cd 100644 --- a/libs/mTextControl/src/fancy_rtf.cpp +++ b/libs/mTextControl/src/fancy_rtf.cpp @@ -53,10 +53,11 @@ static bool bbCodeSimpleFunc(CFormattedTextDraw *ftd, CHARRANGE range, wchar_t * break; case BBS_COLOR_S: cf.dwMask = CFM_COLOR; - cf.dwEffects = CFE_AUTOCOLOR; + cf.crTextColor = _wtoi(pwszText); break; case BBS_COLOR_E: cf.dwMask = CFM_COLOR; + cf.dwEffects = CFE_AUTOCOLOR; break; case BBS_URL1: case BBS_URL2: case BBS_IMG1: case BBS_IMG2: @@ -116,8 +117,8 @@ static BBCodeInfo bbCodes[] = { L"[url]", L"[/url]", bbCodeSimpleFunc, BBS_URL1 }, { L"[url=", L"]", bbCodeSimpleFunc, BBS_URL2 }, - { L"[url]", L"[/url]", bbCodeSimpleFunc, BBS_IMG1 }, - { L"[url=", L"]", bbCodeSimpleFunc, BBS_IMG2 }, + { L"[img]", L"[/img]", bbCodeSimpleFunc, BBS_IMG1 }, + { L"[img=", L"]", bbCodeSimpleFunc, BBS_IMG2 }, }; void bbCodeParse(CFormattedTextDraw *ftd) -- cgit v1.2.3