Merge pull request #52 from Numpsy/rw/streaminputbytes

Change StreamInputBytes.Seek to reset isAtEnd to false
This commit is contained in:
Eliot Jones
2019-08-09 09:40:19 +01:00
committed by GitHub
2 changed files with 8 additions and 0 deletions

View File

@@ -64,6 +64,12 @@
Assert.True(stream.IsAtEnd());
Assert.True(array.IsAtEnd());
stream.Seek(0);
array.Seek(0);
Assert.False(stream.IsAtEnd());
Assert.False(array.IsAtEnd());
}
}
}

View File

@@ -75,6 +75,8 @@
public void Seek(long position)
{
isAtEnd = false;
if (position == 0)
{
stream.Seek(0, SeekOrigin.Begin);