mirror of https://github.com/acidanthera/audk.git
ShellPkg: fix For command parsing list of values.
Fix a check that was checking twice for double quote '"' and not for space ' '. signed-off-by: jcarsey reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12910 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d8fdd5247c
commit
b471606bdf
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Main file for endfor and for shell level 1 functions.
|
||||
|
||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -425,6 +425,7 @@ ShellCommandRunFor (
|
|||
//
|
||||
Info = AllocateZeroPool(sizeof(SHELL_FOR_INFO)+StrSize(gEfiShellParametersProtocol->Argv[1]));
|
||||
ASSERT(Info != NULL);
|
||||
Info->Signature = SHELL_FOR_INFO_SIGNATURE;
|
||||
CopyMem(Info->Set, gEfiShellParametersProtocol->Argv[1], StrSize(gEfiShellParametersProtocol->Argv[1]));
|
||||
Info->ReplacementName = Info->Set;
|
||||
Info->CurrentValue = NULL;
|
||||
|
@ -659,12 +660,9 @@ ShellCommandRunFor (
|
|||
//
|
||||
ASSERT(Info->Set != NULL);
|
||||
if (Info->CurrentValue != NULL && *Info->CurrentValue != CHAR_NULL) {
|
||||
if (Info->CurrentValue[0] == L'\"') {
|
||||
if (Info->CurrentValue[0] == L' ') {
|
||||
Info->CurrentValue++;
|
||||
}
|
||||
// while (Info->CurrentValue[0] == L' ') {
|
||||
// Info->CurrentValue++;
|
||||
// }
|
||||
if (Info->CurrentValue[0] == L'\"') {
|
||||
Info->CurrentValue++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue