From 8177b668f429ec044f40c12ff009747a93210e1e Mon Sep 17 00:00:00 2001 From: dzaima Date: Fri, 5 May 2023 19:38:50 +0300 Subject: [PATCH] =?UTF-8?q?fix=20=E2=88=BE=F0=9D=95=A9=20error=20checking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/builtins/sfns.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/builtins/sfns.c b/src/builtins/sfns.c index 715a7196..6f6e7cbf 100644 --- a/src/builtins/sfns.c +++ b/src/builtins/sfns.c @@ -725,15 +725,20 @@ B join_c1(B t, B x) { if (RARE(cd > rd)) { if ((ur)(cd+1-rd) > 2-rd) thrF("∾: Item ranks in a list can differ by at most one (contained ranks %i and %i)", rm-rd*(cr==rm), cr); if (cr > rr) { // Previous elements were cells + assert(rd==0 && rr>0); esh--; - if (cam != i * *esh) thrM("∾: Item trailing shapes must be equal"); + usz l = *esh; + for (usz j=1; jrm ? cr : rm; rd = 1; } cam += cr < rm ? 1 : *csh++; - if (!eqShPart(csh, esh, cr-1)) thrF("∾: Item trailing shapes must be equal (contained arrays with shapes %H and %H)", x0, c); + if (!eqShPart(csh, esh, rm-1)) thrF("∾: Item trailing shapes must be equal (contained arrays with shapes %H and %H)", x0, c); } if (SFNS_FILLS && !noFill(rf) && !fillEqualsGetFill(rf, c)) rf = bi_noFill; }