Fixed compiler warnings on Visual Studio.
This commit is contained in:
parent
f0eb5c0db9
commit
af555317b9
|
@ -2779,8 +2779,10 @@ int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos)
|
||||||
/* avoid throwing away our precious buffer if seeking within it. */
|
/* avoid throwing away our precious buffer if seeking within it. */
|
||||||
PHYSFS_sint64 offset = pos - PHYSFS_tell(handle);
|
PHYSFS_sint64 offset = pos - PHYSFS_tell(handle);
|
||||||
if ( /* seeking within the already-buffered range? */
|
if ( /* seeking within the already-buffered range? */
|
||||||
((offset >= 0) && (offset <= fh->buffill - fh->bufpos)) /* fwd */
|
/* forward? */
|
||||||
|| ((offset < 0) && (-offset <= fh->bufpos)) /* backward */ )
|
((offset >= 0) && (((size_t)offset) <= fh->buffill-fh->bufpos)) ||
|
||||||
|
/* backward? */
|
||||||
|
((offset < 0) && (((size_t) -offset) <= fh->bufpos)) )
|
||||||
{
|
{
|
||||||
fh->bufpos += (PHYSFS_uint32) offset;
|
fh->bufpos += (PHYSFS_uint32) offset;
|
||||||
return 1; /* successful seek */
|
return 1; /* successful seek */
|
||||||
|
|
Loading…
Reference in New Issue