Skip to content
Permalink
Browse files
Fixed compiler warnings on Visual Studio.
  • Loading branch information
icculus committed Aug 6, 2017
1 parent f0eb5c0 commit af555317b9fcd536f83445cf53b639e64a9da8aa
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/physfs.c
@@ -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 */

0 comments on commit af55531

Please sign in to comment.