summaryrefslogtreecommitdiff
path: root/ShellPkg/Application/Shell
diff options
context:
space:
mode:
authorJaben Carsey <jaben.carsey@intel.com>2015-02-06 21:03:28 +0000
committerjcarsey <jcarsey@Edk2>2015-02-06 21:03:28 +0000
commita8f98806ed0e09e15b2654c81ad3f4577b7ab645 (patch)
treeadfbe0027a8290107435538d44bfdcdca322d27a /ShellPkg/Application/Shell
parent21dd93a928b461efaaa59a9d9e3fdcc76cffa9ad (diff)
downloadedk2-platforms-a8f98806ed0e09e15b2654c81ad3f4577b7ab645.tar.xz
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 <jaben.carsey@intel.com> Reviewed-by: Tapan Shah <tapandshah@hp.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16815 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application/Shell')
-rw-r--r--ShellPkg/Application/Shell/Shell.c6
1 files 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;