From 42668c6a5ad559c8fe7e487555a9a16af35a6b52 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 17 May 2018 10:19:29 +0300 Subject: [PATCH] - fixed seeking end of file in memory reader https://forum.zdoom.org/viewtopic.php?t=60611 --- src/files.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files.cpp b/src/files.cpp index fee5123ff..3e288a0fd 100644 --- a/src/files.cpp +++ b/src/files.cpp @@ -258,7 +258,7 @@ long MemoryReader::Seek(long offset, int origin) break; } - if (offset < 0 || offset >= Length) return -1; + if (offset < 0 || offset > Length) return -1; FilePos = clamp(offset, 0, Length); return 0; }