Fix: divide by zero
This commit is contained in:
@@ -43,6 +43,8 @@ public class DownloadProgress {
|
|||||||
|
|
||||||
public synchronized void addProgress(long progress) {
|
public synchronized void addProgress(long progress) {
|
||||||
this.partial += progress;
|
this.partial += progress;
|
||||||
gui.status(String.format(this.guiPattern + " %.0f %%", 100.0f * this.partial / this.total));
|
if (this.total != 0) {
|
||||||
|
gui.status(String.format(this.guiPattern + " %.0f %%", 100.0f * this.partial / this.total));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user