]> git.eli173.com Git - klapaucius/commitdiff
null-terminating strings properly now...
authorElijah Cohen <eli@eli173.com>
Fri, 15 Nov 2024 20:54:19 +0000 (14:54 -0600)
committerElijah Cohen <eli@eli173.com>
Fri, 15 Nov 2024 20:54:19 +0000 (14:54 -0600)
src/builtins/combinators.c
src/parser.c

index 9b3f4d12127e159e82b25b06120ddb4b094ae601..0aa2fdbe3e09c75816fe6ee02d3de0cf4c69cbb1 100644 (file)
@@ -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;
 }
 
index fc06b25d79ae3574a1afd8f72186ac18cc6c5c82..7559581df020e29736ee7f99c7a714a48ef1c597 100644 (file)
@@ -107,6 +107,7 @@ char* escapify(char* s) {
                }
                sidx++;
        }
+       *outidx = '\0';
        return out;
 }