From dcb25713ba4b0f57558d34e6407feae45b4171db Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Tue, 28 Aug 2018 13:19:20 -0500 Subject: [PATCH] Streams should be able to seek past the end --- libhac/Streams/SharedStream.cs | 2 +- libhac/Streams/SubStream.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libhac/Streams/SharedStream.cs b/libhac/Streams/SharedStream.cs index 775b2dbe..1c2ec881 100644 --- a/libhac/Streams/SharedStream.cs +++ b/libhac/Streams/SharedStream.cs @@ -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; diff --git a/libhac/Streams/SubStream.cs b/libhac/Streams/SubStream.cs index 39aa2055..54ad6ae7 100644 --- a/libhac/Streams/SubStream.cs +++ b/libhac/Streams/SubStream.cs @@ -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;