Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
windows: Fixed logic bug.
  • Loading branch information
icculus committed Aug 2, 2017
1 parent 02c2c47 commit bea510d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/physfs_platform_windows.c
Expand Up @@ -826,7 +826,7 @@ int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos)
{
HANDLE h = ((WinApiFile *) opaque)->handle;
const PHYSFS_sint64 spos = (PHYSFS_sint64) pos;
BAIL_IF(winSetFilePointer(h,spos,NULL,FILE_BEGIN), errcodeFromWinApi(), 0);
BAIL_IF(!winSetFilePointer(h,spos,NULL,FILE_BEGIN), errcodeFromWinApi(), 0);
return 1; /* No error occured */
} /* __PHYSFS_platformSeek */

Expand All @@ -835,7 +835,7 @@ PHYSFS_sint64 __PHYSFS_platformTell(void *opaque)
{
HANDLE h = ((WinApiFile *) opaque)->handle;
PHYSFS_sint64 pos = 0;
BAIL_IF(winSetFilePointer(h,0,&pos,FILE_CURRENT), errcodeFromWinApi(), -1);
BAIL_IF(!winSetFilePointer(h,0,&pos,FILE_CURRENT), errcodeFromWinApi(), -1);
return pos;
} /* __PHYSFS_platformTell */

Expand Down

0 comments on commit bea510d

Please sign in to comment.