From a939dd9e6fd61574785ab312ce80e8b95b97229d Mon Sep 17 00:00:00 2001 From: Elijah Cohen Date: Fri, 15 Nov 2024 14:54:19 -0600 Subject: [PATCH] null-terminating strings properly now... --- src/builtins/combinators.c | 3 +++ src/parser.c | 1 + 2 files changed, 4 insertions(+) diff --git a/src/builtins/combinators.c b/src/builtins/combinators.c index 9b3f4d1..0aa2fdb 100644 --- a/src/builtins/combinators.c +++ b/src/builtins/combinators.c @@ -138,6 +138,9 @@ Sexpr* c_z(Sexpr* b, Sexpr* rest, Sexpr* env) { Sexpr* zg = cons(z, cons(g2, from_nil())); //return cons(g, rest); Sexpr* toret = cons(g,cons(zg, cons(v, rest))); + // wait, can I move the eval from being on v + // to being on toret? + // allows g to execute without necessarily evaluating v... return toret; } diff --git a/src/parser.c b/src/parser.c index fc06b25..7559581 100644 --- a/src/parser.c +++ b/src/parser.c @@ -107,6 +107,7 @@ char* escapify(char* s) { } sidx++; } + *outidx = '\0'; return out; } -- 2.39.2