REFACTOR: Possible loss of fraction.

This commit is contained in:
2017-12-21 17:02:40 +00:00
parent f65de10280
commit e06c140e45
2 changed files with 18 additions and 18 deletions

View File

@@ -1048,7 +1048,7 @@ namespace DiscImageChef.DiscImages
case TYPE_DIFFERENCING:
{
// Block number for BAT searching
uint blockNumber = (uint)Math.Floor((double)(sectorAddress / (thisDynamic.BlockSize / 512)));
uint blockNumber = (uint)Math.Floor((sectorAddress / (thisDynamic.BlockSize / 512.0)));
// Sector number inside of block
uint sectorInBlock = (uint)(sectorAddress % (thisDynamic.BlockSize / 512));
@@ -1131,7 +1131,7 @@ namespace DiscImageChef.DiscImages
Stream thisStream;
// Block number for BAT searching
uint blockNumber = (uint)Math.Floor((double)(sectorAddress / (thisDynamic.BlockSize / 512)));
uint blockNumber = (uint)Math.Floor((sectorAddress / (thisDynamic.BlockSize / 512.0)));
// Sector number inside of block
uint sectorInBlock = (uint)(sectorAddress % (thisDynamic.BlockSize / 512));
// How many sectors before reaching end of block