summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonrad Nowakowski <konrad.x92@gmail.com>2018-01-09 16:31:30 +0000
committerKonrad Nowakowski <konrad.x92@gmail.com>2018-01-09 21:11:16 +0000
commitc73589305eae7d146fad2026039d7859b1869675 (patch)
tree4e47a5639e0ed98aff18fa40c1f02a79f797a691
parentc037f6339f1fc9636b4fc9056ae0b2e2b673024d (diff)
Fix bitwise NOT operator on BitMap's set_bit
-rw-r--r--scene/resources/bit_mask.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp
index e99db8d9cb..e9e15a2532 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_mask.cpp
@@ -81,7 +81,7 @@ void BitMap::set_bit_rect(const Rect2 &p_rect, bool p_value) {
if (p_value)
b |= (1 << bbit);
else
- b &= !(1 << bbit);
+ b &= ~(1 << bbit);
data[bbyte] = b;
}
@@ -127,7 +127,7 @@ void BitMap::set_bit(const Point2 &p_pos, bool p_value) {
if (p_value)
b |= (1 << bbit);
else
- b &= !(1 << bbit);
+ b &= ~(1 << bbit);
bitmask[bbyte] = b;
}