* 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:
2016-09-06 23:21:10 +01:00
parent 6754a040ea
commit 122141c850
10 changed files with 906 additions and 11 deletions

View File

@@ -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);