fixed remaining issues in resource file loading.

This commit is contained in:
Christoph Oelckers 2023-12-13 16:59:15 +01:00
commit 72a2e5d532
4 changed files with 13 additions and 13 deletions

View file

@ -326,7 +326,7 @@ char *MemoryReader::Gets(char *strbuf, ptrdiff_t len)
int BufferingReader::FillBuffer(ptrdiff_t newpos)
{
if (newpos > Length) newpos = Length;
if (newpos < bufferpos) return 0;
if (newpos <= bufferpos) return 0;
auto read = baseReader->Read(&buf[bufferpos], newpos - bufferpos);
bufferpos += read;
if (bufferpos == Length)