diff options
author | George Hazan <ghazan@miranda.im> | 2023-04-24 21:30:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-04-24 21:30:22 +0300 |
commit | c104e058686d3d36bc9b15d84bfd9b84740cd3fa (patch) | |
tree | c89cecfd7bd466d49c9fd0c88e6b490d2ebe3ce8 | |
parent | 0326cb5ef24f96259316dd1b3f07f240e372c60e (diff) |
chats: fix for trimming logs on empty lines
-rw-r--r-- | src/mir_app/src/chat_log.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mir_app/src/chat_log.cpp b/src/mir_app/src/chat_log.cpp index a0ea5cdd25..f0d0065e15 100644 --- a/src/mir_app/src/chat_log.cpp +++ b/src/mir_app/src/chat_log.cpp @@ -137,11 +137,14 @@ static DWORD CALLBACK ChatLogStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, L case STREAMSTAGE_EVENTS:
if (!dat->lin) {
auto &events = si->arEvents;
+LBL_Next:
if (dat->idx < events.getCount()) {
auto &lin = events[dat->idx];
if (si->iType == GCW_SERVER || (si->pDlg->m_iLogFilterFlags & lin.iType) != 0)
dat->pLog->CreateChatRtfEvent(dat, lin);
dat->idx++;
+ if (dat->buf.IsEmpty())
+ goto LBL_Next;
break;
}
}
|