platform/win32.c
branchstable-1.0
changeset 1179 eea580b4e199
parent 1177 05a842260409
child 1648 93b4c3bc6b9d
equal deleted inserted replaced
1177:05a842260409 1179:eea580b4e199
   895     /* Get current position */
   895     /* Get current position */
   896     LowPos = SetFilePointer(FileHandle, 0, &HighPos, FILE_CURRENT);
   896     LowPos = SetFilePointer(FileHandle, 0, &HighPos, FILE_CURRENT);
   897     if ( (LowPos == PHYSFS_INVALID_SET_FILE_POINTER) &&
   897     if ( (LowPos == PHYSFS_INVALID_SET_FILE_POINTER) &&
   898          (GetLastError() != NO_ERROR) )
   898          (GetLastError() != NO_ERROR) )
   899     {
   899     {
   900         BAIL_MACRO(win32strerror(), 0);
   900         BAIL_MACRO(win32strerror(), -1);
   901     } /* if */
   901     } /* if */
   902     else
   902     else
   903     {
   903     {
   904         /* Combine the high/low order to create the 64-bit position value */
   904         /* Combine the high/low order to create the 64-bit position value */
   905         retval = (((PHYSFS_uint64) HighPos) << 32) | LowPos;
   905         retval = (((PHYSFS_uint64) HighPos) << 32) | LowPos;
   942 
   942 
   943     if (FileLength == 0)
   943     if (FileLength == 0)
   944         return 1;  /* we're definitely at EOF. */
   944         return 1;  /* we're definitely at EOF. */
   945 
   945 
   946     /* Get the current position in the file */
   946     /* Get the current position in the file */
   947     if ((FilePosition = __PHYSFS_platformTell(opaque)) != 0)
   947     if ((FilePosition = __PHYSFS_platformTell(opaque)) != -1
   948     {
   948     {
   949         /* Non-zero if EOF is equal to the file length */
   949         /* Non-zero if EOF is equal to the file length */
   950         retval = (FilePosition == FileLength);
   950         retval = (FilePosition == FileLength);
   951     } /* if */
   951     } /* if */
   952 
   952