Began working on a few bugs, thanks /u/skeeto!

This commit is contained in:
2023-01-15 20:30:17 +00:00
parent aeecfabbbc
commit 68ed39fc45
5 changed files with 22 additions and 6 deletions

View File

@@ -30,7 +30,11 @@ void repl() {
for(;;) {
printf("> ");
fgets(input, size, stdin);
//handle EOF for exits
if (!fgets(input, size, stdin)) {
break;
}
//escape the repl (length of 5 to accomodate the newline)
if (strlen(input) == 5 && (!strncmp(input, "exit", 4) || !strncmp(input, "quit", 4))) {