diff options
-rw-r--r-- | src/libstddjb/bitarray_not.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstddjb/bitarray_not.c b/src/libstddjb/bitarray_not.c index 6c4149e..1e9f5af 100644 --- a/src/libstddjb/bitarray_not.c +++ b/src/libstddjb/bitarray_not.c @@ -7,7 +7,7 @@ void bitarray_not (unsigned char *s, size_t a, size_t b) if (!b) return ; b += a ; if ((a >> 3) == ((b-1) >> 3)) - s[a>>3] ^= ((1 << (a & 7)) - 1) ^ ((a << (b & 7)) - 1) ; + s[a>>3] ^= ((1 << (a & 7)) - 1) ^ ((1 << (1 + (b-1 & 7))) - 1) ; else { size_t i = (a>>3) + 1 ; |