summaryrefslogtreecommitdiff
path: root/src/download.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/download.c')
-rw-r--r--src/download.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/download.c b/src/download.c
index 1108b6d..cddf0de 100644
--- a/src/download.c
+++ b/src/download.c
@@ -134,7 +134,10 @@ int update_progress(void *data, double dltotal, double dlnow,
/* Print status information */
{
double frac;
- frac = 100 * dlnow / dltotal;
+ if(dlnow > 0)
+ frac = 100 * dlnow / dltotal;
+ else
+ frac = 0;
printf("\rDownload progress: %3.0lf%% ", frac);
fflush(stdout);