2002/05/16 04:21:02
[org.ibex.core.git] / src / org / xwt / Resources.java
index be058d3..f2a1cdc 100644 (file)
@@ -82,9 +82,10 @@ public class Resources {
                     return super.read();
                 }
                 public int read(byte[] b, int off, int len) throws IOException {
-                    bytesDownloaded += len;
+                    int ret = super.read(b, off, len);
+                    if (ret != -1) bytesDownloaded += ret;
                     Main.updateSplashScreen();
-                    return super.read(b, off, len);
+                    return ret;
                 }
             });
         for(ZipEntry ze = zis.getNextEntry(); ze != null; ze = zis.getNextEntry()) {