mirror of
https://github.com/NevermindZZT/letter-shell.git
synced 2025-01-21 10:02:54 +08:00
优化 切换用户时输入密码显示为 *
This commit is contained in:
parent
e3e86a97eb
commit
f1cc2e6b69
@ -835,7 +835,7 @@ void shellInsertByte(Shell *shell, char data)
|
||||
shell->parser.buffer[shell->parser.length++] = data;
|
||||
shell->parser.buffer[shell->parser.length] = 0;
|
||||
shell->parser.cursor++;
|
||||
shellWriteByte(shell, data);
|
||||
shellWriteByte(shell, shell->status.isChecked ? data : '*');
|
||||
}
|
||||
else if (shell->parser.cursor < shell->parser.length)
|
||||
{
|
||||
@ -848,7 +848,8 @@ void shellInsertByte(Shell *shell, char data)
|
||||
shell->parser.buffer[++shell->parser.length] = 0;
|
||||
for (short i = shell->parser.cursor - 1; i < shell->parser.length; i++)
|
||||
{
|
||||
shellWriteByte(shell, shell->parser.buffer[i]);
|
||||
shellWriteByte(shell,
|
||||
shell->status.isChecked ? shell->parser.buffer[i] : '*');
|
||||
}
|
||||
for (short i = shell->parser.length - shell->parser.cursor; i > 0; i--)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "shell_cfg.h"
|
||||
|
||||
#define SHELL_VERSION "3.2.2" /**< 版本号 */
|
||||
#define SHELL_VERSION "3.2.3" /**< 版本号 */
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user