Fixed seeking within read buffers.

This commit is contained in:
Ryan C. Gordon 2017-09-25 16:32:52 -04:00
parent 425131ccda
commit 3d8817346d
1 changed files with 1 additions and 1 deletions

View File

@ -2889,7 +2889,7 @@ int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos)
/* backward? */
((offset < 0) && (((size_t) -offset) <= fh->bufpos)) )
{
fh->bufpos += (PHYSFS_uint32) offset;
fh->bufpos = (size_t) (((PHYSFS_sint64) fh->bufpos) + offset);
return 1; /* successful seek */
} /* if */
} /* if */