mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* TODO:
* README.md: * DiscImageChef.DiscImages/NDIF.cs: * DiscImageChef.DiscImages/DiscImageChef.DiscImages.csproj: Adds support for Apple NDIF images, closes #47 * Claunia.RsrcFork: * DiscImageChef.DiscImages/UDIF.cs: * DiscImageChef.DiscImages/DiskCopy42.cs: Try to get and use "vers" resource from the Resource Fork to get ImageApplication and its version. * DiscImageChef.Filters/OffsetStream.cs: Corrected OffsetStream arithmetic bug.
This commit is contained in:
@@ -369,7 +369,7 @@ namespace DiscImageChef.Filters
|
||||
{
|
||||
get
|
||||
{
|
||||
return streamEnd - streamStart;
|
||||
return streamEnd - streamStart + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ namespace DiscImageChef.Filters
|
||||
|
||||
public override int ReadByte()
|
||||
{
|
||||
return baseStream.Position == streamEnd ? -1 : baseStream.ReadByte();
|
||||
return baseStream.Position == streamEnd + 1 ? -1 : baseStream.ReadByte();
|
||||
}
|
||||
|
||||
public override void WriteByte(byte value)
|
||||
@@ -446,7 +446,7 @@ namespace DiscImageChef.Filters
|
||||
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
if(baseStream.Position + count > streamEnd)
|
||||
if(baseStream.Position + count > streamEnd + 1)
|
||||
throw new IOException("Cannot read past stream end.");
|
||||
|
||||
return baseStream.Read(buffer, offset, count);
|
||||
|
||||
Reference in New Issue
Block a user