From 8aa09768f045f258aaabba38d806d141e2787037 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Tue, 20 Sep 2016 21:23:37 -0400 Subject: [PATCH] - Fixed: Memory(Array)Reader's seek range didn't include the end of file. Since GetLength exists this is inconsequential for ZDoom, but still incorrect. --- src/files.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/files.cpp b/src/files.cpp index 0b7203236..93a8c9729 100644 --- a/src/files.cpp +++ b/src/files.cpp @@ -527,7 +527,7 @@ long MemoryReader::Seek (long offset, int origin) break; } - FilePos=clamp(offset,0,Length-1); + FilePos=clamp(offset,0,Length); return 0; } @@ -583,7 +583,7 @@ long MemoryArrayReader::Seek (long offset, int origin) break; } - FilePos=clamp(offset,0,Length-1); + FilePos=clamp(offset,0,Length); return 0; }