mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 09:52:18 +08:00
Merge pull request #15532 from lethiandev/fix-bitwise-not-op
Fix bitwise NOT operator on BitMap's set_bit
This commit is contained in:
commit
cc487f8ce9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user