Streams should be able to seek past the end

This commit is contained in:
Alex Barney 2018-08-28 13:19:20 -05:00
parent 38dca5c526
commit dcb25713ba
2 changed files with 2 additions and 2 deletions

View file

@ -65,7 +65,7 @@ namespace libhac.Streams
get => _position;
set
{
if (value < 0 || value >= Length)
if (value < 0)
throw new ArgumentOutOfRangeException(nameof(value));
_position = value;

View file

@ -42,7 +42,7 @@ namespace libhac.Streams
get => BaseStream.Position - Offset;
set
{
if (value < 0 || value >= Length)
if (value < 0)
throw new ArgumentOutOfRangeException(nameof(value));
BaseStream.Position = Offset + value;