- fixed seeking end of file in memory reader

https://forum.zdoom.org/viewtopic.php?t=60611
(cherry picked from commit 42668c6a5a)
This commit is contained in:
alexey.lysiuk 2018-05-17 10:19:29 +03:00 committed by drfrag666
parent 86eb6b8f85
commit f8dc707edf

View file

@ -260,7 +260,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<long>(offset, 0, Length);
return 0;
}