diff --git a/src/builtins/sfns.c b/src/builtins/sfns.c index 492e0c7c..ca2de80e 100644 --- a/src/builtins/sfns.c +++ b/src/builtins/sfns.c @@ -921,19 +921,15 @@ B pick_ucw(B t, B o, B w, B x) { B arg = IGet(x, wi); B rep = c1(o, arg); if (reusable(x) && TI(x,canStore)(rep)) { - if (TI(x,elType)==el_i32) { - i32* xp = i32any_ptr(x); - xp[wi] = o2i(rep); - return x; - } else if (v(x)->type==t_harr) { + if (TI(x,elType)==el_i8 ) { i8* xp = i8any_ptr (x); xp[wi] = o2iu(rep); return x; } + else if (TI(x,elType)==el_i16) { i16* xp = i16any_ptr(x); xp[wi] = o2iu(rep); return x; } + else if (TI(x,elType)==el_i32) { i32* xp = i32any_ptr(x); xp[wi] = o2iu(rep); return x; } + else if (TI(x,elType)==el_f64) { f64* xp = f64any_ptr(x); xp[wi] = o2fu(rep); return x; } + else if (v(x)->type==t_harr) { B* xp = harr_ptr(x); dec(xp[wi]); xp[wi] = rep; return x; - } else if (TI(x,elType)==el_f64) { - f64* xp = f64any_ptr(x); - xp[wi] = o2f(rep); - return x; } else if (v(x)->type==t_fillarr) { B* xp = fillarr_ptr(a(x)); dec(xp[wi]);