about summary refs log tree commit diff stats
path: root/miasm2/jitter/jitload.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/jitter/jitload.py')
-rw-r--r--miasm2/jitter/jitload.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/miasm2/jitter/jitload.py b/miasm2/jitter/jitload.py
index a035445b..2335cc3c 100644
--- a/miasm2/jitter/jitload.py
+++ b/miasm2/jitter/jitload.py
@@ -144,12 +144,11 @@ class CallbackHandlerBitflag(CallbackHandler):
         Iterator on other results"""
 
         res = True
-        for b in self.callbacks:
-
-            if b & bitflag != 0:
+        for bitflag_expected in self.callbacks:
+            if bitflag_expected & bitflag == bitflag_expected:
                 # If the flag matched
                 for res in super(CallbackHandlerBitflag,
-                                 self).call_callbacks(b, *args):
+                                 self).call_callbacks(bitflag_expected, *args):
                     if res is not True:
                         yield res