summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {