* DiscImageChef.Filesystems/BFS.cs:

Prevent index out of array on checking BeFS with
	  less-than-sector-size boot sector.

	* DiscImageChef/Commands/Checksum.cs:
	  Corrected checksum calculation for multiple tracks

	* DiscImageChef.DiscImages/CDRWin.cs:
	  Corrected typo in track calculation.
This commit is contained in:
2015-11-09 22:17:45 +00:00
parent bbc209c121
commit 26b0b6373b
6 changed files with 30 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
2015-11-09 Natalia Portillo <claunia@claunia.com>
* Commands/Checksum.cs:
Corrected checksum calculation for multiple tracks
2015-11-09 Natalia Portillo <claunia@claunia.com>
* Main.cs:

View File

@@ -81,6 +81,9 @@ namespace DiscImageChef.Commands
List<Track> inputTracks = inputFormat.GetTracks();
foreach (Track currentTrack in inputTracks)
{
DicConsole.DebugWriteLine("Checksum command", "Track {0} starts at sector {1} and ends at sector {2}", currentTrack.TrackSequence,
currentTrack.TrackStartSector, currentTrack.TrackEndSector);
Adler32Context adler32ctxTrack = new Adler32Context();
CRC16Context crc16ctxTrack = new CRC16Context();
CRC32Context crc32ctxTrack = new CRC32Context();
@@ -125,9 +128,9 @@ namespace DiscImageChef.Commands
ulong sectors = currentTrack.TrackEndSector - currentTrack.TrackStartSector + 1;
DicConsole.WriteLine("Track {0} has {1} sectors", currentTrack.TrackSequence, sectors);
for (ulong i = currentTrack.TrackStartSector; i <= currentTrack.TrackEndSector; i++)
for (ulong i = 0; i < sectors; i++)
{
DicConsole.Write("\rHashing sector {0} of track {1}", i + 1, currentTrack.TrackSequence);
DicConsole.Write("\rHashing sector {0} of track {1}", i, currentTrack.TrackSequence);
byte[] sector = inputFormat.ReadSector(i, currentTrack.TrackSequence);
if (options.DoAdler32)
adler32ctxTrack.Update(sector);
@@ -196,7 +199,6 @@ namespace DiscImageChef.Commands
}
}
if (options.WholeDisc)
{
Adler32Context adler32ctx = new Adler32Context();