From: Jason Lynch Date: Tue, 5 Feb 2013 14:48:37 +0000 (-0600) Subject: Fix duplication/dropping of messages in certain instances. X-Git-Tag: 0.9-beta1~5 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=76d18ce4c66f5e654a3743811e426e8b48d230ca Fix duplication/dropping of messages in certain instances. When multiple messages are processed at once, if one of the messages is flagged for redirection, the wrong array is accessed, potentially causing the redirected message to be dropped and another message to be duplicated. --- diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index 9b1395bb..d7a330a0 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -350,7 +350,7 @@ void CoreSession::processMessages() // recheck if there exists a buffer to store a redirected message in for (int i = 0; i < redirectedMessages.count(); i++) { - const RawMessage &rawMsg = _messageQueue.at(i); + const RawMessage &rawMsg = redirectedMessages.at(i); if (bufferInfoCache.contains(rawMsg.networkId) && bufferInfoCache[rawMsg.networkId].contains(rawMsg.target)) { bufferInfo = bufferInfoCache[rawMsg.networkId][rawMsg.target]; }