Correct block size arithmetic.

This commit is contained in:
2016-08-01 17:57:55 +01:00
parent 2c3755145e
commit b60f650733
2 changed files with 6 additions and 2 deletions

View File

@@ -1,3 +1,7 @@
2016-08-01 Natalia Portillo <claunia@claunia.com>
* File.cs: Correct block size arithmetic.
2016-08-01 Natalia Portillo <claunia@claunia.com> 2016-08-01 Natalia Portillo <claunia@claunia.com>
* Consts.cs: * Consts.cs:

View File

@@ -143,12 +143,12 @@ namespace DiscImageChef.Filesystems.UCSDPascal
if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0) if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0)
{ {
stat.Blocks = catalogBlocks.Length / stat.BlockSize; stat.Blocks = (catalogBlocks.Length / stat.BlockSize) + (catalogBlocks.Length % stat.BlockSize);
stat.Length = catalogBlocks.Length; stat.Length = catalogBlocks.Length;
} }
else else
{ {
stat.Blocks = bootBlocks.Length / stat.BlockSize; stat.Blocks = (bootBlocks.Length / stat.BlockSize) + (catalogBlocks.Length % stat.BlockSize);
stat.Length = bootBlocks.Length; stat.Length = bootBlocks.Length;
} }