diff --git a/src/builtins/sfns.c b/src/builtins/sfns.c index 281797c3..e47ccd36 100644 --- a/src/builtins/sfns.c +++ b/src/builtins/sfns.c @@ -882,52 +882,60 @@ B join_c1(B t, B x) { } st[a] = len; } - - // Move the data + + // Shapes known correct; move the data usz* csh = tr ? SH(x0) + r0-tr : NULL; // Trailing shape usz csz = shProd(csh, 0, tr); - MAKE_MUT(r, shProd(st, 0, xr)*csz); - // Element index and effective shape, updated progressively - usz *ei =tsh; for (usz i=0; i0) { + MAKE_MUT(r, ria); + // Element index and effective shape, updated progressively + usz *ei =tsh; for (usz i=0; i