From b7705175886141ad16c278786e7e620b1fab5a1e Mon Sep 17 00:00:00 2001 From: Ben Copsey Date: Mon, 17 Nov 2008 18:47:18 +0000 Subject: [PATCH] Small tweak to fix progress issue when delegate is a UIProgressView (thanks to Roman Busyghin for this fix) --- ASIHTTPRequest.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ASIHTTPRequest.m b/ASIHTTPRequest.m index 30a9df43..677d6edf 100644 --- a/ASIHTTPRequest.m +++ b/ASIHTTPRequest.m @@ -488,7 +488,7 @@ - (void)updateUploadProgress // We aren't using a queue, we should just set progress of the indicator } else { - [ASIHTTPRequest setProgress:(double)(byteCount/postLength) forProgressIndicator:uploadProgressDelegate]; + [ASIHTTPRequest setProgress:(double)(1.0*byteCount/postLength) forProgressIndicator:uploadProgressDelegate]; } } @@ -557,7 +557,7 @@ - (void)updateDownloadProgress // We aren't using a queue, we should just set progress of the indicator to 0 } else if (contentLength > 0) { - [ASIHTTPRequest setProgress:(double)(bytesReadSoFar/contentLength) forProgressIndicator:downloadProgressDelegate]; + [ASIHTTPRequest setProgress:(double)(1.0*bytesReadSoFar/contentLength) forProgressIndicator:downloadProgressDelegate]; } }