summaryrefslogtreecommitdiff
path: root/protocols/IRCG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-10-02 18:04:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-10-02 18:04:10 +0000
commitcb76807ead33fa0efdf5420e881259fd86045586 (patch)
treefaf505b189131888042d3813360c7cb10c8499de /protocols/IRCG
parentc133d3f9924fa89912a3c576e0b2ddf4f8987100 (diff)
wrong shift operation (thx Coverity)
git-svn-id: http://svn.miranda-ng.org/main/trunk@17344 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG')
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp10
1 files changed, 6 insertions, 4 deletions
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);
}