diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-03-02 14:23:03 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-03-02 14:23:03 +1300 |
commit | 714fbe6eb7c0eb42b46e99dc4be6e45ef414d095 (patch) | |
tree | 23cf50fe2b9bfc7ba34450f52583001863d54fb9 | |
parent | First commit of sps(1) (diff) | |
download | spsh-714fbe6eb7c0eb42b46e99dc4be6e45ef414d095.tar.gz spsh-714fbe6eb7c0eb42b46e99dc4be6e45ef414d095.zip |
Quietly ignore empty lines
-rw-r--r-- | loop.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 */ |