diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c index 53718c7751..36c913939b 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c @@ -135,8 +135,8 @@ ShellCommandRunHexEdit ( Size = ShellStrToUintn(ShellCommandLineGetRawValue(Package, 2));
}
}
- if (WhatToDo == FileTypeNone && ShellCommandLineGetRawValue(Package, 1) != NULL) {
- Name = ShellCommandLineGetRawValue(Package, 1);
+ Name = ShellCommandLineGetRawValue(Package, 1);
+ if (WhatToDo == FileTypeNone && Name != NULL) {
if (!IsValidFileName(Name)) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, Name);
ShellStatus = SHELL_INVALID_PARAMETER;
|