diff --git a/src/builtins/sysfn.c b/src/builtins/sysfn.c index 419a9017..d23dae96 100644 --- a/src/builtins/sysfn.c +++ b/src/builtins/sysfn.c @@ -1187,7 +1187,8 @@ B bitcast_im(Md1D* d, B x) { B f = d->f; } static usz req2(usz s, char* name) { - if (s & (s-1)) thrF("•bit._%U: sizes in 𝕗 must be powers of 2 (contained %s)", name, s); + usz top = 1ull << (8*sizeof(usz)-1); // Prevent 0 from passing + if ((top|s) & (s-1)) thrF("•bit._%U: sizes in 𝕗 must be powers of 2 (contained %s)", name, s); return s; }