From 7774d8ba5e7310072175ec520ae3fffbe3fbfcc0 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sat, 28 Sep 2024 18:42:59 +0300 Subject: [PATCH] slightly better number asFill --- src/core/fillarr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/fillarr.c b/src/core/fillarr.c index b455aeca..645aa3e2 100644 --- a/src/core/fillarr.c +++ b/src/core/fillarr.c @@ -4,7 +4,11 @@ B asFill(B x) { // consumes if (isArr(x)) { u8 xe = TI(x,elType); usz ia = IA(x); - if (elNum(xe)) return i64EachDec(0, x); + if (elNum(xe)) { + B r = taga(arr_shCopy(allZeroes(ia), x)); + decG(x); + return r; + } if (elChr(xe)) { u8* rp; B r = m_c8arrc(&rp, x); for (usz i = 0; i < ia; i++) rp[i] = ' ';