skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit 43dfdceef9f5eb75e8f3a50eb19ac9129f11b34e
parent 00e0cad87182eebc8af16172c1dedb10761ffded
Author: Olivier Brunel <jjk@jjacky.com>
Date:   Sun, 15 May 2016 00:24:14 +0200

bitarray_not: Fix skipping a byte

Signed-off-by: Olivier Brunel <jjk@jjacky.com>

Diffstat:
Msrc/libstddjb/bitarray_not.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libstddjb/bitarray_not.c b/src/libstddjb/bitarray_not.c @@ -12,7 +12,7 @@ void bitarray_not (register unsigned char *s, register unsigned int a, register { register unsigned int i = (a>>3) + 1 ; s[a>>3] ^= ~((1 << (a & 7)) - 1) ; - for (; i < (b>>3) - 1 ; i++) s[i] = ~s[i] ; + for (; i < (b>>3) ; i++) s[i] = ~s[i] ; s[b>>3] ^= (1 << (b & 7)) - 1 ; } }