From 9273fdfbac8bdb76d66ba2b2dbfbd860ad0434b3 Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Fri, 25 Nov 2011 15:36:55 +0000 Subject: [PATCH] ldlinux: Don't return previous command if user pressenter enter If the user presses enter at the command prompt then simply print the command prompt again on a newline - don't re-execute the previous command. Signed-off-by: Matt Fleming --- com32/elflink/ldlinux/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c index 4749dda..3bb7db4 100644 --- a/com32/elflink/ldlinux/cli.c +++ b/com32/elflink/ldlinux/cli.c @@ -451,7 +451,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , strcpy(comm_counter->command, ret); list_add(&(comm_counter->list), &cli_history_head); - return ret; + return len ? ret : NULL; } static int cli_init(void) -- 2.7.4