From 9f88cb5044297003623fb63d47836c1167322417 Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Mon, 15 Dec 2008 04:20:28 +0000 Subject: [PATCH] opkg: protect against total being zero when calculation percentage git-svn-id: http://opkg.googlecode.com/svn/trunk@23 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- opkg_download.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.25.1