diff options
author | Tom Gundersen <teg@jklm.no> | 2015-07-17 12:33:49 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-07-17 12:33:49 +0200 |
commit | 511ed7991737dc567bef51a8051a1a577fa18e05 (patch) | |
tree | 2fbaca7a64373b848a8cd42811f142206a391543 /src | |
parent | 724dd73d1be5b1cc2d181deb12bb8637b5f430d0 (diff) | |
parent | a933570dea029fbb25f6b62d46b7462366ed1430 (diff) |
Merge pull request #611 from dvdhrm/bitmap-fixes
Bitmap fixes
Diffstat (limited to 'src')
-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]) { |