From 8dc1dd2fb44216d964abf47f8e5b3181b18c42f1 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 28 Aug 2015 19:12:28 +0200 Subject: Windows bootloader: Mask/unmask PIM value in bootloader the same way as the password --- src/Boot/Windows/BootMain.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Boot') diff --git a/src/Boot/Windows/BootMain.cpp b/src/Boot/Windows/BootMain.cpp index d2494e8f..7101139d 100644 --- a/src/Boot/Windows/BootMain.cpp +++ b/src/Boot/Windows/BootMain.cpp @@ -64,7 +64,7 @@ static void PrintMainMenu () return; Print (" Keyboard Controls:\r\n"); - Print (" [F5] Hide/Show Password\r\n"); + Print (" [F5] Hide/Show Password and PIM\r\n"); Print (" [Esc] "); #ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE @@ -246,6 +246,10 @@ static byte AskPassword (Password &password, int& pim) } continue; + case TC_BIOS_KEY_F5: + hidePassword ^= 0x01; + continue; + default: if (scanCode == TC_BIOS_KEY_ESC || IsMenuKey (scanCode)) { @@ -265,7 +269,8 @@ static byte AskPassword (Password &password, int& pim) pim = 10*pim + (asciiCode - '0'); pos++; - + + if (hidePassword) asciiCode = '*'; if (pos < MAX_PIM) PrintChar (asciiCode); else -- cgit v1.2.3