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; }