diff --git a/src/core/stuff.h b/src/core/stuff.h index 4b4c2c53..311e8195 100644 --- a/src/core/stuff.h +++ b/src/core/stuff.h @@ -165,7 +165,7 @@ static usz uszMul(usz a, usz b) { static u8 selfElType(B x) { // guaranteed to fit fill if (isF64(x)) return q_i8(x)? (q_bit(x)? el_bit : el_i8) : (q_i16(x)? el_i16 : q_i32(x)? el_i32 : el_f64); - if (isC32(x)) return LIKELY(q_c8(x))? el_c8 : q_c16(x)? el_c16 : el_c32; + if (isC32(x)) { u32 c = o2cG(x); return LIKELY(c<=255)? el_c8 : c<=65535? el_c16 : el_c32; } return el_B; } static bool elChr(u8 x) { return x>=el_c8 && x<=el_c32; }