Correct mistake in FileDevicePathToStr

This commit is contained in:
asava 2020-03-30 02:21:38 +03:00
parent 7e747613a9
commit 17c92d9526

View File

@ -1700,7 +1700,7 @@ CHAR16 *FileDevicePathToStr(IN EFI_DEVICE_PATH_PROTOCOL *DevPath)
while (Char != NULL) {
// StrCpyS(Char, 4, Char + 1); //can't overlap
Tail = Char + 1;
while (*Tail != 0) {
while (*Char != 0) {
*(Char++) = *(Tail++);
}
Char = (CHAR16*)StrStr(FilePath, L"\\\\"); // cast is ok because FilePath is not const, and we know that StrStr returns a pointer in FilePath. Will disappear when using a string object instead of CHAR16*