From c73589305eae7d146fad2026039d7859b1869675 Mon Sep 17 00:00:00 2001 From: Konrad Nowakowski Date: Tue, 9 Jan 2018 16:31:30 +0000 Subject: [PATCH] Fix bitwise NOT operator on BitMap's set_bit --- scene/resources/bit_mask.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp index e99db8d9cb4..e9e15a25321 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; }