]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
MdeModulePkg/BmpSupportLib: Refine type cast for pointer subtraction
[mirror_edk2.git] / MdeModulePkg / Library / BaseBmpSupportLib / BmpSupportLib.c
index 2c95e91ecc6d734d5d00850226e2d45db7dd6d60..467cd6a58db312b51b85c969b7681a82765df0f9 100644 (file)
@@ -426,7 +426,7 @@ TranslateBmpToGopBlt (
 \r
     }\r
 \r
-    ImageIndex = (UINTN)(Image - ImageHeader);\r
+    ImageIndex = (UINTN)Image - (UINTN)ImageHeader;\r
     if ((ImageIndex % 4) != 0) {\r
       //\r
       // Bmp Image starts each row on a 32-bit boundary!\r