summaryrefslogtreecommitdiff
path: root/libs/mTextControl/src/fancy_rtf.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-08-10 12:02:31 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-08-10 12:02:31 +0300
commit3187428bb2f7b929e31ebf64b1e21d9c0fbc4f2b (patch)
treefa1704b43d0a1c5b3c7b67f1e4f9f8142f39d0be /libs/mTextControl/src/fancy_rtf.cpp
parent258cb3c6a167d7f3ca125de2d7ba70ea2ef65a63 (diff)
NewStory: memory leak fix + small quirks fixed
Diffstat (limited to 'libs/mTextControl/src/fancy_rtf.cpp')
-rw-r--r--libs/mTextControl/src/fancy_rtf.cpp7
1 files changed, 4 insertions, 3 deletions
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)