From b29154673e3bf5f0997e98ac20518ef9f874216e Mon Sep 17 00:00:00 2001 From: loogg <2544047213@qq.com> Date: Wed, 29 May 2019 20:14:53 +0800 Subject: [PATCH 1/2] Update shell.c --- components/finsh/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 53dcd11c66..98a63bdbbf 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -309,8 +309,8 @@ static void finsh_wait_auth(void) else if (ch == '\b' && cur_pos > 0) { /* backspace */ + cur_pos--; password[cur_pos] = '\0'; - cur_pos--; rt_kprintf("\b \b"); } else if (ch == '\r' || ch == '\n') From 52d1e51e3e4e25fcf8460af0bc65532ed647321c Mon Sep 17 00:00:00 2001 From: loogg <2544047213@qq.com> Date: Wed, 29 May 2019 20:34:03 +0800 Subject: [PATCH 2/2] Update shell.c --- components/finsh/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 98a63bdbbf..3a02e24c2e 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -309,7 +309,7 @@ static void finsh_wait_auth(void) else if (ch == '\b' && cur_pos > 0) { /* backspace */ - cur_pos--; + cur_pos--; password[cur_pos] = '\0'; rt_kprintf("\b \b"); }