summaryrefslogtreecommitdiff
path: root/gtk/gtkbitmaskprivateimpl.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-11-09 09:05:47 +0100
committerAlexander Larsson <alexl@redhat.com>2012-11-09 10:11:47 +0100
commit77912a65e2aa6eb9cfee994fa93bbfbc6b9f8538 (patch)
tree9697aa5db4a075115004a61e67ca06850af6d723 /gtk/gtkbitmaskprivateimpl.h
parent8a40d8fe2a756763e4370c45c0abc0ed641636df (diff)
downloadgtk+-77912a65e2aa6eb9cfee994fa93bbfbc6b9f8538.tar.gz
Fix cnp bug in _gtk_bitmask_intersects
We need to use the allocated codepath if *any* argument is allocated, not if one arg is not allocated. This bug caused unnecessary calls to _gtk_bitmask_is_allocated, as well as return completely wrong result if both bitmask are allocated.
Diffstat (limited to 'gtk/gtkbitmaskprivateimpl.h')
-rw-r--r--gtk/gtkbitmaskprivateimpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkbitmaskprivateimpl.h b/gtk/gtkbitmaskprivateimpl.h
index 0dea65abe7..c46fa9622c 100644
--- a/gtk/gtkbitmaskprivateimpl.h
+++ b/gtk/gtkbitmaskprivateimpl.h
@@ -159,8 +159,8 @@ static inline gboolean
_gtk_bitmask_intersects (const GtkBitmask *mask,
const GtkBitmask *other)
{
- if (!_gtk_bitmask_is_allocated (mask) ||
- !_gtk_bitmask_is_allocated (other))
+ if (_gtk_bitmask_is_allocated (mask) ||
+ _gtk_bitmask_is_allocated (other))
return _gtk_allocated_bitmask_intersects (mask, other);
else
return _gtk_bitmask_to_bits (mask) & _gtk_bitmask_to_bits (other);