diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 53dcd11c669e1fe80b15794136b4f29862b3fb81..3a02e24c2e71cc28e0c2bc44983897c4e13d94ec 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 */ - password[cur_pos] = '\0'; cur_pos--; + password[cur_pos] = '\0'; rt_kprintf("\b \b"); } else if (ch == '\r' || ch == '\n')