Handle cell size 0 correctly in cellWidthLog()
This commit is contained in:
parent
c72b9b5abd
commit
ea1367e639
@ -66,6 +66,5 @@ static u8 cellWidthLog(B x) {
|
||||
if (LIKELY(RNK(x)==1)) return lw;
|
||||
usz csz = arr_csz(x);
|
||||
if (csz & (csz-1)) return 7; // Not power of 2
|
||||
lw += CTZ(csz);
|
||||
return lw<7? lw : 7;
|
||||
return lw + CTZ(csz | 128>>lw); // Max of 7; also handle csz==0
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user