]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
ShellPkg: Refine type cast for pointer subtraction
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / DmpStore.c
index 701ff7505f2158f3d59923c2127fe20639270c08..23db54553f11ece5e1d629d7e9998360a7144016 100644 (file)
@@ -364,7 +364,7 @@ AppendSingleVariableToFile (
   //\r
   // Crc32\r
   //\r
-  gBS->CalculateCrc32 (Buffer, (UINTN) (Ptr - Buffer), (UINT32 *) Ptr);\r
+  gBS->CalculateCrc32 (Buffer, (UINTN) Ptr - (UINTN) Buffer, (UINT32 *) Ptr);\r
 \r
   Status = ShellWriteFile (FileHandle, &BufferSize, Buffer);\r
   FreePool (Buffer);\r