1
0
mirror of https://github.com/NevermindZZT/letter-shell.git synced 2025-01-21 10:02:54 +08:00

优化 切换用户时输入密码显示为 *

This commit is contained in:
Letter 2023-11-26 11:58:03 +00:00
parent e3e86a97eb
commit f1cc2e6b69
2 changed files with 4 additions and 3 deletions

View File

@ -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--)
{

View File

@ -14,7 +14,7 @@
#include "shell_cfg.h"
#define SHELL_VERSION "3.2.2" /**< 版本号 */
#define SHELL_VERSION "3.2.3" /**< 版本号 */
/**