Fixed seeking within read buffers.
This commit is contained in:
parent
425131ccda
commit
3d8817346d
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue