This commit is contained in:
Devine Lu Linvega 2024-04-04 18:09:23 -07:00
parent 258fd27a9c
commit 689fa77380
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<> (dup ?x) (?x ?x) <> (swap ?x ?y) (?y ?x)
(dup (123)) (swap 123 456)

View File

@ -24,7 +24,8 @@ walk(char *s)
--depth; --depth;
if(!depth) break; if(!depth) break;
} }
if(depth < 0) break; if(depth == 0 && c == ' ') return s - 1;
if(depth < 1 && c == ' ') { return s - 1; }
} }
return s; return s;
} }
@ -55,6 +56,7 @@ writereg(char r)
if(!depth) break; if(!depth) break;
} }
if(depth < 0) break; if(depth < 0) break;
if(depth == 0 && c == ' ') break;
*outp_++ = c; *outp_++ = c;
} }
return 1; return 1;