From b4425508c3870d3c54227c02103a940aa078ef97 Mon Sep 17 00:00:00 2001 From: dzaima Date: Thu, 16 Dec 2021 17:33:29 +0200 Subject: [PATCH] fix merge refcounting --- src/core/stuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/stuff.c b/src/core/stuff.c index a1fc9f72..c022d359 100644 --- a/src/core/stuff.c +++ b/src/core/stuff.c @@ -670,7 +670,7 @@ B bqn_merge(B x) { B c = GetU(x, i); if (isArr(c)? (elR!=rnk(c) || !eqShPrefix(elSh, a(c)->sh, elR)) : elR!=0) { mut_pfree(r, rp); thrF(">: Elements didn't have equal shapes (contained %H and %H)", x0, c); } if (isArr(c)) mut_copy(r, rp, c, 0, elIA); - else mut_set(r, rp, c); + else mut_set(r, rp, inc(c)); if (!noFill(fill)) fill = fill_or(fill, getFillQ(c)); rp+= elIA; }