Browse Source

Merge pull request #2740 from loogg/master

Update shell.c
Bernard Xiong 6 năm trước cách đây
mục cha
commit
91c858ead2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 */
-                    password[cur_pos] = '\0';
                     cur_pos--;
+                    password[cur_pos] = '\0';
                     rt_kprintf("\b \b");
                 }
                 else if (ch == '\r' || ch == '\n')