diff options
author | George Hazan <ghazan@miranda.im> | 2017-11-17 18:11:55 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-11-17 18:11:55 +0300 |
commit | 81d4a61fb79687dc23fb0def97365577acc70117 (patch) | |
tree | 95bc6d2aec06c786813dd603b1958ee0728b0ee0 /plugins/TabSRMM/src | |
parent | e2014b4b5a94d216a9cdc0a5e2963b456f7a0a4a (diff) |
fixes #1030 (all IRC commands stopped working)
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index fab938ac8b..ec48cdd159 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -886,8 +886,12 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText) const if (iCol > 0) {
if (isChat()) {
- if (mi && mi->bColor)
- res.AppendFormat((iInd >= 0) ? L"%%c%u" : L"%%C", iInd);
+ if (mi && mi->bColor) {
+ if (iInd >= 0)
+ res.AppendFormat(L"%%c%u", iInd);
+ else if (!res.IsEmpty())
+ res.Append(L"%%C");
+ }
}
else res.AppendFormat((iInd >= 0) ? (bInsideColor ? L"[/color][color=%s]" : L"[color=%s]") : (bInsideColor ? L"[/color]" : L""), Utils::rtf_clrs[iInd].szName);
}
@@ -898,7 +902,10 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText) const if (isChat()) {
if (mi && mi->bBkgColor) {
int iInd = RtfColorToIndex(iNumColors, pIndex, _wtoi(p + 10));
- res.AppendFormat((iInd >= 0) ? L"%%f%u" : L"%%F", iInd);
+ if (iInd >= 0)
+ res.AppendFormat(L"%%f%u", iInd);
+ else if (!res.IsEmpty())
+ res.AppendFormat(L"%%F");
}
}
}
|