From a855d03b93fa99af8ceab5b1b843e5721ecc0450 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sat, 29 Apr 2023 15:57:25 +0300 Subject: [PATCH] use %c in v_merge --- src/vm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/vm.c b/src/vm.c index 2be6bf14..1ae1d7fc 100644 --- a/src/vm.c +++ b/src/vm.c @@ -492,24 +492,25 @@ NOINLINE Block* compile(B bcq, B objs, B allBlocks, B allBodies, B indices, B to FORCE_INLINE bool v_merge(Scope* pscs[], B s, B x, bool upd, bool hdr) { assert(TY(s) == t_arrMerge); B o = c(WrappedObj,s)->obj; - if (!isArr(x) || RNK(x)==0) thrF("[…]%U𝕩: 𝕩 cannot have rank 0", upd? "↩" : "←"); + if (!isArr(x) || RNK(x)==0) thrF("[…]%c𝕩: 𝕩 cannot have rank 0", upd? U'↩' : U'←'); B* op = harr_ptr(o); usz oia = IA(o); if (SH(x)[0] != oia) { if (hdr) return false; - else thrF("[…]%U𝕩: Target length & leading axis of 𝕩 didn't match", upd? "↩" : "←"); + else thrF("[…]%c𝕩: Target length & leading axis of 𝕩 didn't match", upd? U'↩' : U'←'); } if (oia == 0) { /*no need to do anything*/ } else if (RNK(x)==1) { SGet(x) for (usz i = 0; i < oia; i++) { B cx = m_unit(Get(x,i)); - if (!hdr) v_set(pscs, op[i], cx, upd, true, false, true); - else { + if (!hdr) { + v_set(pscs, op[i], cx, upd, true, false, true); + } else { bool ok = v_seth(pscs, op[i], cx); - dec(cx); + decG(cx); if (!ok) return false; } }