2003/02/12 06:40:22
[org.ibex.core.git] / src / org / xwt / Resources.java
index a4459d0..1996501 100644 (file)
@@ -84,7 +84,6 @@ public class Resources {
                 }
                 public int read(byte[] b, int off, int len) throws IOException {
                     int ret = super.read(b, off, len);
-                    if (ret != -1) bytesDownloaded += ret;
                     if (clear && callback != null) {
                         clear = false;
                         ThreadMessage.newthread(new JSObject.JSFunction() {
@@ -98,6 +97,7 @@ public class Resources {
                                 }                            
                             });
                     }
+                    bytesDownloaded += ret;
                     return ret;
                 }
             });