diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c index 57fcf4d732..c329d96f95 100644 --- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c +++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c @@ -1165,7 +1165,7 @@ Returns: Ptr = Str; LastSlash = Str; while (*Ptr != 0) { - if (*Ptr == '\\' && *(Ptr + 1) == '.' && *(Ptr + 2) == '.' && *(Ptr + 3) != 0) { + if (*Ptr == '\\' && *(Ptr + 1) == '.' && *(Ptr + 2) == '.' && *(Ptr + 3) == L'\\') { // // Convert "\Name\..\" to "\" // DO NOT convert the .. if it is at the end of the string. This will