Browse Source

* minor fixes in bitmap.c

master
Alex 'AdUser' Z 8 years ago
parent
commit
2a0dcd21cc
  1. 4
      src/bitmap.c

4
src/bitmap.c

@ -54,7 +54,7 @@ bitmap_compare(const unsigned char *a,
return cnt; return cnt;
} }
int size_t
bitmap_diffmap(unsigned char *diff, bitmap_diffmap(unsigned char *diff,
const unsigned char *a, const unsigned char *a,
const unsigned char *b) const unsigned char *b)
@ -81,7 +81,7 @@ bitmap_unpack(const unsigned char *map,
q = *buf; q = *buf;
for (size_t i = 0; i < BITMAP_SIDE; i++, p++) { for (size_t i = 0; i < BITMAP_SIDE; i++, p++) {
row = *p; mask = 0x1; row = *p; mask = 0x1;
for (size_t j = 0; j < 16; j++, q++) { for (size_t j = 0; j < BITMAP_SIDE; j++, q++) {
*q = (row & mask) ? 0xFF : 0x00; *q = (row & mask) ? 0xFF : 0x00;
mask <<= 1; mask <<= 1;
} }

Loading…
Cancel
Save