[commit] r2160 - Fix sqFileAtEnd logic to test if the file position is >= file size instead of ==.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2160 - Fix sqFileAtEnd logic to test if the file position is >= file size instead of ==.

commits-3
 
Author: andreas
Date: 2010-04-01 12:09:26 -0700 (Thu, 01 Apr 2010)
New Revision: 2160

Modified:
   trunk/platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c
Log:
Fix sqFileAtEnd logic to test if the file position is >= file size instead of ==.

Modified: trunk/platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c
===================================================================
--- trunk/platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c 2010-03-30 21:54:16 UTC (rev 2159)
+++ trunk/platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c 2010-04-01 19:09:26 UTC (rev 2160)
@@ -79,7 +79,7 @@
   if (!sqFileValid(f)) FAIL();
   ofs.offset = 0;
   ofs.dwLow = SetFilePointer(FILE_HANDLE(f), 0, &ofs.dwHigh, FILE_CURRENT);
-  return ofs.offset == sqFileSize(f);
+  return ofs.offset >= sqFileSize(f);
 }
 
 sqInt sqFileClose(SQFile *f) {