summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-08-17 22:33:12 +0100
committerubq323 <ubq323@ubq323.website>2024-08-17 22:33:12 +0100
commit494aa09abf2a27ba8138f17c3dad94774153f0b5 (patch)
treee71e65f908932d44d730a4ebec371a830018be4e
parente45cdd61a4cd9f5b0eb7613a88c4989ad58eebeb (diff)
actually include null terminator in spend and spendsplat
-rw-r--r--lib.c1
1 files changed, 1 insertions, 0 deletions
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) {