ErrAppend = FALSE;\r
OutAppend = FALSE;\r
CommandLineCopy = NULL;\r
- FirstLocation = (CHAR16*)(-1);\r
+ FirstLocation = NULL;\r
\r
if (ShellParameters == NULL || SystemTableInfo == NULL || OldStdIn == NULL || OldStdOut == NULL || OldStdErr == NULL) {\r
return (EFI_INVALID_PARAMETER);\r
CommandLineCopy = StrnCatGrow(&CommandLineCopy, NULL, NewCommandLine, 0);\r
Status = EFI_SUCCESS;\r
Split = NULL;\r
+ FirstLocation = CommandLineCopy + StrLen(CommandLineCopy);\r
\r
StripQuotes(CommandLineCopy);\r
\r
}\r
}\r
\r
- if (FirstLocation != (CHAR16*)(-1) \r
+ if (FirstLocation != CommandLineCopy + StrLen(CommandLineCopy)\r
&& ((UINTN)(FirstLocation - CommandLineCopy) < StrLen(NewCommandLine))\r
){\r
*(NewCommandLine + (UINTN)(FirstLocation - CommandLineCopy)) = CHAR_NULL;\r