diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel1CommandsLib/Goto.c')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel1CommandsLib/Goto.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/Goto.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/Goto.c index 3e5a59c575..4d48c7f1e9 100644 --- a/ShellPkg/Library/UefiShellLevel1CommandsLib/Goto.c +++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/Goto.c @@ -33,6 +33,7 @@ ShellCommandRunGoto ( SHELL_STATUS ShellStatus;
CHAR16 *CompareString;
UINTN Size;
+ SCRIPT_FILE *CurrentScriptFile;
ShellStatus = SHELL_SUCCESS;
CompareString = NULL;
@@ -79,6 +80,7 @@ ShellCommandRunGoto ( // Check forwards and then backwards for a label...
//
if (!MoveToTag(GetNextNode, L"endfor", L"for", CompareString, ShellCommandGetCurrentScriptFile(), FALSE, FALSE, TRUE)) {
+ CurrentScriptFile = ShellCommandGetCurrentScriptFile();
ShellPrintHiiEx(
-1,
-1,
@@ -87,9 +89,9 @@ ShellCommandRunGoto ( gShellLevel1HiiHandle,
CompareString,
L"Goto",
- ShellCommandGetCurrentScriptFile()!=NULL
- &&ShellCommandGetCurrentScriptFile()->CurrentCommand!=NULL
- ?ShellCommandGetCurrentScriptFile()->CurrentCommand->Line:0);
+ CurrentScriptFile!=NULL
+ && CurrentScriptFile->CurrentCommand!=NULL
+ ? CurrentScriptFile->CurrentCommand->Line:0);
ShellStatus = SHELL_NOT_FOUND;
}
FreePool(CompareString);
|