]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
ShellPkg: Refine the code to avoid use a constant number as offset.
[mirror_edk2.git] / ShellPkg / Library / UefiShellBcfgCommandLib / UefiShellBcfgCommandLib.c
index 6a078d81cc31ae0547f8e790d5aad0f008645a77..b407608d315405790484aef380f9a5aa9ce74914 100644 (file)
@@ -1111,7 +1111,7 @@ BcfgDisplayDump(
     }\r
 \r
     LoadOption      = (EFI_LOAD_OPTION *)Buffer;\r
-    Description     = (CHAR16 *)(&LoadOption->FilePathListLength + 1);\r
+    Description     = (CHAR16*)(Buffer + sizeof (EFI_LOAD_OPTION));\r
     DescriptionSize = StrSize (Description);\r
 \r
     if (LoadOption->FilePathListLength != 0) {\r