misc/libphysfs/physfs.c
changeset 12453 89423b1db329
parent 12213 bb5522e88ab2
--- a/misc/libphysfs/physfs.c	Tue Sep 05 20:46:40 2017 +0200
+++ b/misc/libphysfs/physfs.c	Tue Sep 05 21:15:25 2017 +0200
@@ -2588,20 +2588,20 @@
     {
         /* leave buffer empty, go right to output instead. */
         rc = io->read(io, buffer, len);
-        if (rc < 0)
+        if (rc <= 0)
             return ((retval == 0) ? rc : retval);
         return retval + rc;
     } /* if */
 
     /* need less than buffer can take. Fill buffer. */
     rc = io->read(io, fh->buffer, fh->bufsize);
-    if (rc < 0)
+    if (rc <= 0)
         return ((retval == 0) ? rc : retval);
 
     assert(fh->bufpos == 0);
     fh->buffill = (PHYSFS_uint32) rc;
     rc = doBufferedRead(fh, buffer, len);  /* go from the start, again. */
-    if (rc < 0)
+    if (rc <= 0)
         return ((retval == 0) ? rc : retval);
 
     return retval + rc;