From 96cd8441f9ab217b1d3c2ba0f2899ef64ca781e4 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 5 Oct 2010 18:17:47 +0200 Subject: [PATCH 1/1] Make sure IrcEventTopic always has two params In case of an empty topic, adding a null string in the event saves us from specialcasing this in a few places. --- src/core/ircparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ircparser.cpp b/src/core/ircparser.cpp index 75ac2c99..34e693d6 100644 --- a/src/core/ircparser.cpp +++ b/src/core/ircparser.cpp @@ -242,10 +242,10 @@ void IrcParser::processNetworkIncoming(NetworkDataEvent *e) { break; case EventManager::IrcEventTopic: - if(params.count() >= 2) { + if(params.count() >= 1) { QString channel = net->serverDecode(params.at(0)); decParams << channel; - decParams << net->channelDecode(channel, decrypt(net, channel, params.at(1), true)); + decParams << (params.count() >= 2? net->channelDecode(channel, decrypt(net, channel, params.at(1), true)) : QString()); } break; -- 2.20.1