windows: Fixed logic bug.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 02 Aug 2017 12:48:40 -0400
changeset 1525 a7df4293a48b
parent 1524 bf22529f7ca9
child 1526 982e1137ec7d
windows: Fixed logic bug.
src/physfs_platform_windows.c
--- a/src/physfs_platform_windows.c	Wed Aug 02 12:48:31 2017 -0400
+++ b/src/physfs_platform_windows.c	Wed Aug 02 12:48:40 2017 -0400
@@ -826,7 +826,7 @@
 {
     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 */
 
@@ -835,7 +835,7 @@
 {
     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 */