Do not display eror message when simply pressing return in CLI version
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 25 Jan 2014 23:56:10 +0000 (18:56 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Sat, 25 Jan 2014 23:56:10 +0000 (18:56 -0500)
Before was displaying message "Syntax error".

src/cli/emuconsole.c

index 5dd93df..8cfbcae 100644 (file)
@@ -323,6 +323,11 @@ console_main(void)
                                break;
                }
 
+               if (strlen(line) == 0) {
+                       /* Empty line, this is not an error. */
+                       continue;
+               }
+
                /* Keep only the Command part from the input line */
                memcpy(Command, &line[0], Index);
                Command[Index] = '\0';