Fix issue from moving to ST.Hashing
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<Version>0.8.0</Version>
|
<Version>0.9.0</Version>
|
||||||
|
|
||||||
<!-- Package Properties -->
|
<!-- Package Properties -->
|
||||||
<Authors>Deterous</Authors>
|
<Authors>Deterous</Authors>
|
||||||
|
|||||||
+18
-1
@@ -1105,6 +1105,22 @@ namespace LibIRD
|
|||||||
// If end of ISO reached, stop reading
|
// If end of ISO reached, stop reading
|
||||||
if (numBytes == 0)
|
if (numBytes == 0)
|
||||||
{
|
{
|
||||||
|
// Ensure all hashes have been saved
|
||||||
|
foreach (int i in regions)
|
||||||
|
{
|
||||||
|
// Close region hash
|
||||||
|
regionMD5[i].Terminate();
|
||||||
|
RegionHashes[i] = regionMD5[i].CurrentHashBytes;
|
||||||
|
regionMD5[i].Dispose();
|
||||||
|
}
|
||||||
|
foreach (int i in files)
|
||||||
|
{
|
||||||
|
// Close file hash
|
||||||
|
fileMD5[i].Terminate();
|
||||||
|
FileHashes[i] = fileMD5[i].CurrentHashBytes;
|
||||||
|
fileMD5[i].Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
// If making redump-style IRD, save CRC32 hash to UID field
|
// If making redump-style IRD, save CRC32 hash to UID field
|
||||||
if (redump)
|
if (redump)
|
||||||
{
|
{
|
||||||
@@ -1112,6 +1128,7 @@ namespace LibIRD
|
|||||||
Array.Reverse(crc32);
|
Array.Reverse(crc32);
|
||||||
UID = BitConverter.ToUInt32(crc32, 0);
|
UID = BitConverter.ToUInt32(crc32, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1240,7 +1257,7 @@ namespace LibIRD
|
|||||||
// Check if current file has ended in this buffer (assumes last extent contains last byte)
|
// Check if current file has ended in this buffer (assumes last extent contains last byte)
|
||||||
int lastExtent = FileExtents[i].Length - 1;
|
int lastExtent = FileExtents[i].Length - 1;
|
||||||
long lastByte = SectorSize * FileExtents[i][lastExtent].Offset + FileExtents[i][lastExtent].Count;
|
long lastByte = SectorSize * FileExtents[i][lastExtent].Offset + FileExtents[i][lastExtent].Count;
|
||||||
if (lastByte < SectorSize * (currentSector + bufSectors)
|
if (lastByte <= SectorSize * (currentSector + bufSectors)
|
||||||
&& lastByte > SectorSize * currentSector)
|
&& lastByte > SectorSize * currentSector)
|
||||||
{
|
{
|
||||||
// Close file hash
|
// Close file hash
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<Version>0.8.0</Version>
|
<Version>0.9.0</Version>
|
||||||
<PackageOutputPath>../nupkg</PackageOutputPath>
|
<PackageOutputPath>../nupkg</PackageOutputPath>
|
||||||
|
|
||||||
<!-- Package Properties -->
|
<!-- Package Properties -->
|
||||||
|
|||||||
Reference in New Issue
Block a user