Skip to content

Commit a94b216

Browse files
committed
Bugfix on BitProxy assignment operator
1 parent 6b39bb1 commit a94b216

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/vclib/space/bit_set/bit_proxy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class BitProxy
5656

5757
void operator=(bool bit)
5858
{
59-
mask.get() = (mask.get() ^ (1 << index)) | (bit << index);
59+
mask.get() = (mask.get() & ~(1 << index)) | (bit << index);
6060
}
6161

6262
BitProxy& operator|=(bool bit)

0 commit comments

Comments
 (0)