2002/05/16 04:21:02
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:47:17 +0000 (06:47 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:47:17 +0000 (06:47 +0000)
darcs-hash:20040130064717-2ba56-946a7742bb4aebd135335c084f302b12127b384c.gz

CHANGES
src/org/xwt/Resources.java

diff --git a/CHANGES b/CHANGES
index 2cea836..139094c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 15-May megacz Platform.java: added GCJ-Linux platform detection logic,
               setLimits() logic.
 
+15-May megacz Resources.java: fixed a bug in download-size calculation.
+
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()) {