diff --git a/src/intset.c b/src/intset.c index b61530e45198..5d894e3cd08b 100644 --- a/src/intset.c +++ b/src/intset.c @@ -133,7 +133,7 @@ static uint8_t intsetSearch(intset *is, int64_t value, uint32_t *pos) { } while(max >= min) { - mid = (min+max)/2; + mid = ((unsigned int)min + (unsigned int)max) >> 1; cur = _intsetGet(is,mid); if (value > cur) { min = mid+1;