From: megacz Date: Fri, 30 Jan 2004 06:47:17 +0000 (+0000) Subject: 2002/05/16 04:21:02 X-Git-Tag: RC3~1741 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=2cd2755874c254d6675e1b166ed438b4fbbfe762;hp=7e44b314529106dfc24f09c6c3ac6b9adba92cb2;p=org.ibex.core.git 2002/05/16 04:21:02 darcs-hash:20040130064717-2ba56-946a7742bb4aebd135335c084f302b12127b384c.gz --- diff --git a/CHANGES b/CHANGES index 2cea836..139094c 100644 --- a/CHANGES +++ b/CHANGES @@ -149,3 +149,5 @@ 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. + diff --git a/src/org/xwt/Resources.java b/src/org/xwt/Resources.java index be058d3..f2a1cdc 100644 --- a/src/org/xwt/Resources.java +++ b/src/org/xwt/Resources.java @@ -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()) {