summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2012-01-05 20:43:31 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2012-01-05 20:43:31 +0000
commitb471606bdf566d8cb050239d863b7231064edec2 (patch)
treefb3749245b4f3d8a53b7e0c67a6b62ba107d9ed3
parentd8fdd5247ca6e33c71fc354fdb752f3c8df9d72c (diff)
downloadedk2-platforms-b471606bdf566d8cb050239d863b7231064edec2.tar.xz
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
-rw-r--r--ShellPkg/Library/UefiShellLevel1CommandsLib/For.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c
index 7d91d2348f..b01c69d3da 100644
--- a/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c
+++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c
@@ -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++;
}