Skip to content

Commit

Permalink
Fixed compiler warnings on Visual Studio.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 6, 2017
1 parent f0eb5c0 commit af55531
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/physfs.c
Expand Up @@ -2779,8 +2779,10 @@ int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos)
/* avoid throwing away our precious buffer if seeking within it. */
PHYSFS_sint64 offset = pos - PHYSFS_tell(handle);
if ( /* seeking within the already-buffered range? */
((offset >= 0) && (offset <= fh->buffill - fh->bufpos)) /* fwd */
|| ((offset < 0) && (-offset <= fh->bufpos)) /* backward */ )
/* forward? */
((offset >= 0) && (((size_t)offset) <= fh->buffill-fh->bufpos)) ||
/* backward? */
((offset < 0) && (((size_t) -offset) <= fh->bufpos)) )
{
fh->bufpos += (PHYSFS_uint32) offset;
return 1; /* successful seek */
Expand Down

0 comments on commit af55531

Please sign in to comment.