From: Hugo Villeneuve Date: Sat, 25 Jan 2014 23:56:10 +0000 (-0500) Subject: Do not display eror message when simply pressing return in CLI version X-Git-Tag: v2.0.1~40 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=d74a41311f6bd7bba4bf9683de0fe742a6bd43c6;p=emu8051.git Do not display eror message when simply pressing return in CLI version Before was displaying message "Syntax error". --- diff --git a/src/cli/emuconsole.c b/src/cli/emuconsole.c index 5dd93df..8cfbcae 100644 --- a/src/cli/emuconsole.c +++ b/src/cli/emuconsole.c @@ -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';