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

commits at squeakvm.org commits at squeakvm.org
Thu Apr 1 19:10:46 UTC 2010


Author: andreas
Date: 2010-04-01 12:10:46 -0700 (Thu, 01 Apr 2010)
New Revision: 2161

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

Modified: trunk/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
===================================================================
--- trunk/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c	2010-04-01 19:09:26 UTC (rev 2160)
+++ trunk/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c	2010-04-01 19:10:46 UTC (rev 2161)
@@ -114,7 +114,7 @@
 	/* Return true if the file's read/write head is at the end of the file. */
 
 	if (!sqFileValid(f)) return interpreterProxy->success(false);
-	return ftell(getFile(f)) == getSize(f);
+	return ftell(getFile(f)) >= getSize(f);
 }
 
 sqInt sqFileClose(SQFile *f) {



More information about the Vm-dev mailing list