From ee396bc1b8b6cab8fa8ff47dcaad0abf1c148420 Mon Sep 17 00:00:00 2001 From: fourtf Date: Tue, 19 Jun 2018 20:19:43 +0200 Subject: [PATCH] fixed messages not replacing --- src/widgets/helper/channelview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/helper/channelview.cpp b/src/widgets/helper/channelview.cpp index 698769116..d3a7b6005 100644 --- a/src/widgets/helper/channelview.cpp +++ b/src/widgets/helper/channelview.cpp @@ -435,7 +435,7 @@ void ChannelView::setChannel(ChannelPtr newChannel) // on message replaced this->channelConnections_.push_back( newChannel->messageReplaced.connect([this](size_t index, MessagePtr replacement) { - if (this->messages.getSnapshot().getLength() >= index || index < 0) { + if (index >= this->messages.getSnapshot().getLength() || index < 0) { return; }