diff options
Diffstat (limited to 'src/basic/bitmap.c')
-rw-r--r-- | src/basic/bitmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/bitmap.c b/src/basic/bitmap.c index d559be1bbb..c5039fd22f 100644 --- a/src/basic/bitmap.c +++ b/src/basic/bitmap.c @@ -152,12 +152,12 @@ bool bitmap_iterate(Bitmap *b, Iterator *i, unsigned *n) { long long bitmask; unsigned offset, rem; - if (!b && i->idx == BITMAP_END) + if (!b || i->idx == BITMAP_END) return false; offset = BITMAP_NUM_TO_OFFSET(i->idx); rem = BITMAP_NUM_TO_REM(i->idx); - bitmask = 1 << rem; + bitmask = 1ULL << rem; for (; offset < b->n_bitmaps; offset ++) { if (b->bitmaps[offset]) { |