From cb76807ead33fa0efdf5420e881259fd86045586 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 2 Oct 2016 18:04:10 +0000 Subject: wrong shift operation (thx Coverity) git-svn-id: http://svn.miranda-ng.org/main/trunk@17344 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IRCG/src/commandmonitor.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'protocols/IRCG') diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 1219816788..ecf55b4f83 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -502,10 +502,12 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) } // set bit for own mode on this channel (voice/hop/op/admin/owner) - if (bAdd && cModeBit >= 0) - wi->OwnMode |= (1 << cModeBit); - else - wi->OwnMode &= ~(1 << cModeBit); + if (cModeBit >= 0) { + if (bAdd) + wi->OwnMode |= (1 << cModeBit); + else + wi->OwnMode &= ~(1 << cModeBit); + } Chat_SetUserInfo(m_szModuleName, pmsg->parameters[0], wi); } -- cgit v1.2.3