From 494aa09abf2a27ba8138f17c3dad94774153f0b5 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 17 Aug 2024 22:33:12 +0100 Subject: actually include null terminator in spend and spendsplat --- lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib.c b/lib.c index 413c60b..ba03c75 100644 --- a/lib.c +++ b/lib.c @@ -114,6 +114,7 @@ static Val fn_spend(State *S, int nargs, Val *args) { memcpy(cur, s->d, s->len); cur += s->len; } + new[len] = '\0'; return VAL_OBJ(objstring_take(S, new, len)); } static Val fn_spendsplat(State *S, int nargs, Val *args) { -- cgit v1.2.3