mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +00:00
seeking 1 byte after the last byte in the stream should be allowed, shouldn't it? because reading the last byte will put the position there as well.
This commit is contained in:
parent
25c7aa2af6
commit
e16cfb9873
1 changed files with 2 additions and 2 deletions
|
@ -140,7 +140,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
if(origin == SeekOrigin.Begin)
|
||||
{
|
||||
// Check if this exceeds limits
|
||||
if((offset >= this.length) || (offset < 0))
|
||||
if((offset > this.length) || (offset < 0))
|
||||
throw new ArgumentException("Attempted to seek outside the range of the stream.");
|
||||
|
||||
// Seek
|
||||
|
@ -150,7 +150,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
else if(origin == SeekOrigin.Current)
|
||||
{
|
||||
// Check if this exceeds limits
|
||||
if((this.position + offset >= this.length) || (this.position + offset < 0))
|
||||
if((this.position + offset > this.length) || (this.position + offset < 0))
|
||||
throw new ArgumentException("Attempted to seek outside the range of the stream.");
|
||||
|
||||
// Seek
|
||||
|
|
Loading…
Reference in a new issue