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;