summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-07-17 12:33:49 +0200
committerTom Gundersen <teg@jklm.no>2015-07-17 12:33:49 +0200
commit511ed7991737dc567bef51a8051a1a577fa18e05 (patch)
tree2fbaca7a64373b848a8cd42811f142206a391543 /src
parent724dd73d1be5b1cc2d181deb12bb8637b5f430d0 (diff)
parenta933570dea029fbb25f6b62d46b7462366ed1430 (diff)
Merge pull request #611 from dvdhrm/bitmap-fixes
Bitmap fixes
Diffstat (limited to 'src')
-rw-r--r--src/basic/bitmap.c4
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]) {