return (Status);\r
}\r
\r
+/**\r
+ Determin if a file name represents a unicode file.\r
+\r
+ @param[in] FileName Pointer to the filename to open.\r
+\r
+ @retval EFI_SUCCESS The file is a unicode file.\r
+ @return An error upon failure.\r
+**/\r
EFI_STATUS\r
EFIAPI\r
IsUnicodeFile(\r
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
CommandLineWalker[0] = CHAR_NULL;\r
}\r
\r
+ //\r
+ // Verify not the same and not duplicating something from a split\r
+ //\r
if (\r
//\r
// Check that no 2 filenames are the same\r