NewPath = AllocateZeroPool(Size);\r
ASSERT(NewPath != NULL);\r
StrCpy(NewPath, Cwd);\r
- if (NewPath[StrLen(NewPath)-1] == Path[0] == (CHAR16)L'\\') {\r
+ if ((NewPath[0] == (CHAR16)L'\\') &&\r
+ (NewPath[StrLen(NewPath)-1] == (CHAR16)L'\\')\r
+ ) {\r
((CHAR16*)NewPath)[StrLen(NewPath)-1] = CHAR_NULL;\r
}\r
StrCat(NewPath, Path);\r
\r
This must be removed via calling CleanUpShellProtocol().\r
\r
- @param[in,out] NewShell The pointer to the pointer to the structure \r
+ @param[in,out] NewShell The pointer to the pointer to the structure\r
to install.\r
\r
@retval EFI_SUCCESS The operation was successful.\r
}\r
\r
/**\r
- Opposite of CreatePopulateInstallShellProtocol. \r
+ Opposite of CreatePopulateInstallShellProtocol.\r
\r
Free all memory and restore the system to the state it was in before calling\r
CreatePopulateInstallShellProtocol.\r