From a8f98806ed0e09e15b2654c81ad3f4577b7ab645 Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Fri, 6 Feb 2015 21:03:28 +0000 Subject: [PATCH] ShellPkg: command help with -? flag is not working and it gives too many arguments error message. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey Reviewed-by: Tapan Shah git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16815 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/Shell.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index 6bfd370f0b..3061f8fcbc 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -1989,7 +1989,6 @@ DoHelpUpdate( { CHAR16 *CurrentParameter; CHAR16 *Walker; - CHAR16 *LastWalker; CHAR16 *NewCommandLine; EFI_STATUS Status; @@ -2002,11 +2001,10 @@ DoHelpUpdate( Walker = *CmdLine; while(Walker != NULL && *Walker != CHAR_NULL) { - LastWalker = Walker; if (!EFI_ERROR(GetNextParameter(&Walker, &CurrentParameter, StrSize(*CmdLine)))) { if (StrStr(CurrentParameter, L"-?") == CurrentParameter) { - LastWalker[0] = L' '; - LastWalker[1] = L' '; + CurrentParameter[0] = L' '; + CurrentParameter[1] = L' '; NewCommandLine = AllocateZeroPool(StrSize(L"help ") + StrSize(*CmdLine)); if (NewCommandLine == NULL) { Status = EFI_OUT_OF_RESOURCES;