diff options
author | George Hazan <ghazan@miranda.im> | 2019-07-25 15:30:08 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-07-25 15:30:08 +0300 |
commit | 26bad3021644315e27ef1ee43402de1dd1507eca (patch) | |
tree | 4654705b9c67db4aa6f0fcf3d789f2c551358ad6 /plugins/Scriver/src/msglog.cpp | |
parent | bae70808afbe0ca866d008090a8e3580342d16f3 (diff) |
warning fixes
Diffstat (limited to 'plugins/Scriver/src/msglog.cpp')
-rw-r--r-- | plugins/Scriver/src/msglog.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index 85862fe33a..908a6269b1 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -97,14 +97,12 @@ int DbEventIsShown(DBEVENTINFO &dbei) {
switch (dbei.eventType) {
case EVENTTYPE_MESSAGE:
+ case EVENTTYPE_FILE:
return 1;
case EVENTTYPE_JABBER_CHATSTATES:
case EVENTTYPE_JABBER_PRESENCE:
return 0;
-
- case EVENTTYPE_FILE:
- return 1;
}
return DbEventIsCustomForMsgWindow(&dbei);
@@ -388,7 +386,7 @@ static void AppendWithCustomLinks(EventData *evt, int style, CMStringA &buf) BOOL isAnsii = (evt->dwFlags & IEEDF_UNICODE_TEXT) == 0;
WCHAR *wText;
- size_t len, laststart = 0;
+ size_t len;
if (isAnsii) {
len = mir_strlen(evt->pszText);
wText = mir_a2u(evt->pszText);
@@ -398,9 +396,9 @@ static void AppendWithCustomLinks(EventData *evt, int style, CMStringA &buf) len = (int)mir_wstrlen(evt->pszTextW);
}
- if (len - laststart > 0) {
+ if (len > 0) {
buf.AppendFormat("%s ", SetToStyle(style));
- AppendUnicodeOrAnsiiToBufferL(buf, wText + laststart, len - laststart, isAnsii);
+ AppendUnicodeOrAnsiiToBufferL(buf, wText, len, isAnsii);
}
if (isAnsii)
|