platform/posix.c
branchstable-2.0
changeset 1178 dec7e09cb3d9
parent 1074 5ad7902d1ab9
child 1190 28cedf325670
--- a/platform/posix.c	Mon Aug 01 17:37:06 2011 -0400
+++ b/platform/posix.c	Mon Aug 01 17:52:51 2011 -0400
@@ -383,7 +383,7 @@
 {
     PHYSFS_sint64 pos = __PHYSFS_platformTell(opaque);
     PHYSFS_sint64 len = __PHYSFS_platformFileLength(opaque);
-    return(pos >= len);
+    return((tell < 0) || (len < 0) || (pos >= len));
 } /* __PHYSFS_platformEOF */