aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--loop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/loop.c b/loop.c
index 107b4b2..e1cc31a 100644
--- a/loop.c
+++ b/loop.c
@@ -12,7 +12,9 @@ void loop() {
/* If the line is valid, try to run it as a command */
if (line != NULL) {
- cmd(line);
+ if (strlen(line) > 0) {
+ cmd(line);
+ }
}
/* If the line is EOF (^D), break out of the loop */