Fix expression in IrcEvent::create()
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 19 Nov 2013 21:19:47 +0000 (22:19 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 19 Nov 2013 21:19:47 +0000 (22:19 +0100)
We need to inverse the mask, obviously. Thanks to Tucos for pointing
this out.

src/common/ircevent.cpp

index c002a97..ff481b3 100644 (file)
@@ -22,7 +22,7 @@
 
 Event *IrcEvent::create(EventManager::EventType type, QVariantMap &map, Network *network)
 {
 
 Event *IrcEvent::create(EventManager::EventType type, QVariantMap &map, Network *network)
 {
-    if ((type & EventManager::IrcEventNumericMask) == EventManager::IrcEventNumeric)
+    if ((type & ~EventManager::IrcEventNumericMask) == EventManager::IrcEventNumeric)
         return new IrcEventNumeric(type, map, network);
 
     if ((type & EventManager::EventGroupMask) != EventManager::IrcEvent)
         return new IrcEventNumeric(type, map, network);
 
     if ((type & EventManager::EventGroupMask) != EventManager::IrcEvent)