Fix off-by-one error in bin_index_up

This commit is contained in:
Linus Unnebäck 2018-10-24 13:42:00 +02:00
parent 635de63a8a
commit b6d60256a5
No known key found for this signature in database
GPG Key ID: CE70CEAE9C0FA66F

View File

@ -99,7 +99,7 @@ static int bin_index_up(size_t x)
if (x <= 32) return x;
x--;
if (x < 512) return bin_tab[x/8-4] + 1;
if (x > 0x1c00) return 63;
if (x > 0x1c00) return 64;
return bin_tab[x/128-4] + 17;
}