summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shim.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shim.c b/shim.c
index 39a7f478..fc3dafc3 100644
--- a/shim.c
+++ b/shim.c
@@ -707,6 +707,9 @@ static EFI_STATUS generate_path(EFI_LOADED_IMAGE *li, EFI_DEVICE_PATH **grubpath
bootpath[i+1] = '\0';
+ if (bootpath[i-i] == '\\')
+ bootpath[i] = '\0';
+
*PathName = AllocatePool(StrSize(bootpath) + StrSize(SECOND_STAGE));
if (!*PathName) {