Merge branch 'fix/infinite' into 'master'

Fix: divide by zero

See merge request sheepitrenderfarm/client!311
This commit is contained in:
Laurent Clouet
2024-06-04 16:33:10 +00:00

View File

@@ -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;
if (this.total != 0) {
gui.status(String.format(this.guiPattern + " %.0f %%", 100.0f * this.partial / this.total)); gui.status(String.format(this.guiPattern + " %.0f %%", 100.0f * this.partial / this.total));
} }
}
} }