X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorebacklogmanager.cpp;h=9ef4b8990e2279fbe46b8c29c38e7e62dda710ef;hp=1c3fae98b5604592b6626db83e12c8f2b8605c95;hb=5ff4265bbd3a682a6d6542480760eaf4a2b85d77;hpb=70283ef877bdf3339fb067667ad9130ceabd8b9a diff --git a/src/core/corebacklogmanager.cpp b/src/core/corebacklogmanager.cpp index 1c3fae98..9ef4b899 100644 --- a/src/core/corebacklogmanager.cpp +++ b/src/core/corebacklogmanager.cpp @@ -43,8 +43,8 @@ QVariantList CoreBacklogManager::requestBacklog(BufferId bufferId, MsgId first, msgIter++; } - if(additional) { - MsgId oldestMessage; + if(additional && limit != 0) { + MsgId oldestMessage = first; if(!msgList.isEmpty()) { if(msgList.first().msgId() < msgList.last().msgId()) oldestMessage = msgList.first().msgId();