aboutsummaryrefslogtreecommitdiffstats
path: root/src/zbtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/zbtest.c')
-rw-r--r--src/zbtest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zbtest.c b/src/zbtest.c
index 8e9f8ff..8ad0d94 100644
--- a/src/zbtest.c
+++ b/src/zbtest.c
@@ -9,10 +9,10 @@ zbtest(z_t a, size_t bit)
if (zzero(a))
return 0;
- chars = bit >> LB_BITS_PER_CHAR;
+ chars = FLOOR_BITS_TO_CHARS(bit);
if (chars >= a->used)
return 0;
- bit &= BITS_PER_CHAR - 1;
+ bit = BITS_IN_LAST_CHAR(bit);
return (a->chars[chars] >> bit) & 1;
}