- fixed seeking end of file in memory reader

https://forum.zdoom.org/viewtopic.php?t=60611
This commit is contained in:
alexey.lysiuk 2018-05-17 10:19:29 +03:00
parent fb876852bb
commit 42668c6a5a

View file

@ -258,7 +258,7 @@ long MemoryReader::Seek(long offset, int origin)
break; break;
} }
if (offset < 0 || offset >= Length) return -1; if (offset < 0 || offset > Length) return -1;
FilePos = clamp<long>(offset, 0, Length); FilePos = clamp<long>(offset, 0, Length);
return 0; return 0;
} }