When copy command prompts to overwrite an existing file, pressing
backspace continuously removes everything including the shell prompt.
So print only valid characters for file overwrite prompt.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
break;\r
}\r
}\r
- break; case ShellPromptResponseTypeYesNoAllCancel:\r
+ break;\r
+ case ShellPromptResponseTypeYesNoAllCancel:\r
if (Prompt != NULL) {\r
ShellPrintEx(-1, -1, L"%s", Prompt);\r
}\r
if (EFI_ERROR(Status)) {\r
break;\r
}\r
- ShellPrintEx(-1, -1, L"%c", Key.UnicodeChar);\r
+\r
+ if (Key.UnicodeChar <= 127 && Key.UnicodeChar >= 32) {\r
+ ShellPrintEx (-1, -1, L"%c", Key.UnicodeChar);\r
+ }\r
+\r
switch (Key.UnicodeChar) {\r
case L'Y':\r
case L'y':\r