mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Fixed empty inputs breaking the interactive repl
Also tweaked README.md and CONTRIBUTING.md
This commit is contained in:
@@ -186,6 +186,11 @@ int repl(const char* name) {
|
||||
inputBuffer[--length] = '\0';
|
||||
}
|
||||
|
||||
if (length == 0) {
|
||||
printf("%s> ", name); //shows the terminal prompt
|
||||
continue;
|
||||
}
|
||||
|
||||
//end
|
||||
if (strlen(inputBuffer) == 4 && (strncmp(inputBuffer, "exit", 4) == 0 || strncmp(inputBuffer, "quit", 4) == 0)) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user