mirror of https://github.com/acidanthera/audk.git
ShellPkg: Fix "for" command statement initialization.
The shell was failing to correctly parse up to the space only for “run (1 3)” and also losing the space for “in ” a b” c” for loop initialization. This fixes for initialization to be correct. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14997 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
06f1982a64
commit
c81863953f
|
@ -270,7 +270,7 @@ ReturnUintn(
|
|||
{
|
||||
UINT64 RetVal;
|
||||
|
||||
if (!EFI_ERROR(ShellConvertStringToUint64(String, &RetVal, FALSE, FALSE))) {
|
||||
if (!EFI_ERROR(ShellConvertStringToUint64(String, &RetVal, FALSE, TRUE))) {
|
||||
return ((UINTN)RetVal);
|
||||
}
|
||||
return ((UINTN)(-1));
|
||||
|
@ -370,11 +370,7 @@ ShellCommandRunFor (
|
|||
gEfiShellParametersProtocol->Argv[2]) == 0) {
|
||||
for (LoopVar = 0x3 ; LoopVar < gEfiShellParametersProtocol->Argc ; LoopVar++) {
|
||||
ASSERT((ArgSet == NULL && ArgSize == 0) || (ArgSet != NULL));
|
||||
if (ArgSet == NULL) {
|
||||
// ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L"\"", 0);
|
||||
} else {
|
||||
ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L" \"", 0);
|
||||
}
|
||||
ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L" \"", 0);
|
||||
if (StrStr(gEfiShellParametersProtocol->Argv[LoopVar], L"*") != NULL
|
||||
||StrStr(gEfiShellParametersProtocol->Argv[LoopVar], L"?") != NULL
|
||||
||StrStr(gEfiShellParametersProtocol->Argv[LoopVar], L"[") != NULL
|
||||
|
|
Loading…
Reference in New Issue