Explorar o código

Update shell.c

loogg %!s(int64=6) %!d(string=hai) anos
pai
achega
b29154673e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      components/finsh/shell.c

+ 1 - 1
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')