summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--opkg_download.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/opkg_download.c b/opkg_download.c
index 161a510..c3fa44c 100644
--- a/opkg_download.c
+++ b/opkg_download.c
@@ -42,7 +42,7 @@ curl_progress_func (char* url,
double ulnow)
{
int i;
- int p = d*100/t;
+ int p = (t) ? d*100/t : 0;
#ifdef OPKG_LIB
if (opkg_cb_download_progress)