mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Began working on a few bugs, thanks /u/skeeto!
This commit is contained in:
@@ -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))) {
|
||||
|
||||
Reference in New Issue
Block a user