From b471606bdf566d8cb050239d863b7231064edec2 Mon Sep 17 00:00:00 2001 From: jcarsey Date: Thu, 5 Jan 2012 20:43:31 +0000 Subject: [PATCH] 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 --- ShellPkg/Library/UefiShellLevel1CommandsLib/For.c | 8 +++----- 1 file 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.
+ Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.
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++; }