From 54160445284875eee9ed85d513791b193a076d0b Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 2 Apr 2008 22:20:24 +0000 Subject: Fix for media xml crash bugs Formatting Check for empty item titles Created function to check if any part of a string contains a phrase Added some basic error checking to getquote Note this does not completely fix all problems git-archimport-id: getht@sv.gnu.org/getht--mainline--0.1--patch-31 --- src/download.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/download.c') 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); -- cgit v1.2.3