From: Elijah Cohen Date: Fri, 15 Nov 2024 20:54:19 +0000 (-0600) Subject: null-terminating strings properly now... X-Git-Tag: v-12.13.14~9 X-Git-Url: https://git.eli173.com/?a=commitdiff_plain;h=a939dd9e6fd61574785ab312ce80e8b95b97229d;p=klapaucius null-terminating strings properly now... --- 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; }