[FREELDR] Addendum / actual fix for ef76709b
[reactos.git] / boot / freeldr / freeldr / lib / fs / fat.c
index 63a1283..7dad4f2 100644 (file)
@@ -1570,7 +1570,7 @@ const DEVVTBL* FatMount(ULONG DeviceId)
         FrLdrTempFree(Volume, TAG_FAT_VOLUME);
         return NULL;
     }
-    SectorCount.QuadPart = FileInformation.EndingAddress.QuadPart;
+    SectorCount.QuadPart = (FileInformation.EndingAddress.QuadPart - FileInformation.StartingAddress.QuadPart);
     SectorCount.QuadPart /= SECTOR_SIZE;
 
     //