Fixed empty inputs breaking the interactive repl

Also tweaked README.md and CONTRIBUTING.md
This commit is contained in:
2024-10-08 23:11:27 +11:00
parent 0779798347
commit 9f45925072
3 changed files with 13 additions and 4 deletions

View File

@@ -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;