Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Avoid division by zero.
Vsevolod Stakhov committed 11 years ago
commit ff333bcc11446909e11ddb6e74b011d3910288ed
parent 1747f8b
1 file changed +1 -1
modified src/event.c
@@ -366,7 +366,7 @@ draw_progressbar(int64_t current, int64_t total)
	int hours, minutes, seconds;
	int r = 0;

-
	percent =  current * 100 / total;
+
	percent = (total != 0) ? (current * 100 / total) : 100;

	if (progress_started && (percent != last_progress_percent || current == total)) {
		last_progress_percent = percent;