diff options
author | George Hazan <george.hazan@gmail.com> | 2016-10-02 18:04:10 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-10-02 18:04:10 +0000 |
commit | cb76807ead33fa0efdf5420e881259fd86045586 (patch) | |
tree | faf505b189131888042d3813360c7cb10c8499de /protocols | |
parent | c133d3f9924fa89912a3c576e0b2ddf4f8987100 (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')
-rw-r--r-- | protocols/IRCG/src/commandmonitor.cpp | 10 |
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);
}
|