]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: command help with -? flag is not working and it gives too many arguments...
authorJaben Carsey <jaben.carsey@intel.com>
Fri, 6 Feb 2015 21:03:28 +0000 (21:03 +0000)
committerjcarsey <jcarsey@Edk2>
Fri, 6 Feb 2015 21:03:28 +0000 (21:03 +0000)
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

ShellPkg/Application/Shell/Shell.c

index 6bfd370f0b2f49e9901aabb2e601c5e203ac75bc..3061f8fcbc7e22b155b6c77c8460bad8e0fc6796 100644 (file)
@@ -1989,7 +1989,6 @@ DoHelpUpdate(
 {\r
   CHAR16 *CurrentParameter;\r
   CHAR16 *Walker;\r
-  CHAR16 *LastWalker;\r
   CHAR16 *NewCommandLine;\r
   EFI_STATUS Status;\r
 \r
@@ -2002,11 +2001,10 @@ DoHelpUpdate(
 \r
   Walker = *CmdLine;\r
   while(Walker != NULL && *Walker != CHAR_NULL) {\r
-    LastWalker = Walker;\r
     if (!EFI_ERROR(GetNextParameter(&Walker, &CurrentParameter, StrSize(*CmdLine)))) {\r
       if (StrStr(CurrentParameter, L"-?") == CurrentParameter) {\r
-        LastWalker[0] = L' ';\r
-        LastWalker[1] = L' ';\r
+        CurrentParameter[0] = L' ';\r
+        CurrentParameter[1] = L' ';\r
         NewCommandLine = AllocateZeroPool(StrSize(L"help ") + StrSize(*CmdLine));\r
         if (NewCommandLine == NULL) {\r
           Status = EFI_OUT_OF_RESOURCES;\r