]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/ShellParametersProtocol.c
ShellPkg: Fix Shell fail when execute command in ShellProtocol.Execute().
[mirror_edk2.git] / ShellPkg / Application / Shell / ShellParametersProtocol.c
index bc19df7e931e7d556a684671f5f1a8863a8ecf62..b4049873404466e22b098c975c214abd06deb6ae 100644 (file)
@@ -206,6 +206,7 @@ ParseCommandLineToArgs(
     return (EFI_SUCCESS);\r
   }\r
 \r
+  TrimSpaces(&(CHAR16*)CommandLine);\r
   Size = StrSize(CommandLine);\r
   TempParameter = AllocateZeroPool(Size);\r
   if (TempParameter == NULL) {\r
@@ -359,7 +360,6 @@ CreatePopulateInstallShellParametersProtocol (
     //\r
     // Populate Argc and Argv\r
     //\r
-    TrimSpaces (&FullCommandLine);\r
     Status = ParseCommandLineToArgs(FullCommandLine,\r
                                     &(*NewShellParameters)->Argv,\r
                                     &(*NewShellParameters)->Argc);\r