[PATCH] bitarray_not: Fix skipping a byte

From: Olivier Brunel <jjk_at_jjacky.com>
Date: Sun, 15 May 2016 00:24:14 +0200

Signed-off-by: Olivier Brunel <jjk_at_jjacky.com>
---
 src/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
index 4bd95ad..de37b9f 100644
--- a/src/libstddjb/bitarray_not.c
+++ b/src/libstddjb/bitarray_not.c
_at_@ -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 ;
   }
 }
-- 
2.8.2
Received on Sat May 14 2016 - 22:24:14 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC