From b3c141fd2ea46e1ffb3e2fb69a483408c456657e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Thu, 13 Jul 2000 08:37:39 +0000 Subject: [PATCH] Fix a bug in the stats display that showed up when resuming aborted transfers. Submitted by: green --- usr.bin/fetch/fetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index 94d77b1a0517..d6aa1fbb9d1f 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -125,7 +125,7 @@ stat_display(struct xferstat *xs, int force) fprintf(stderr, ": %lld bytes", xs->rcvd); else fprintf(stderr, " (%lld bytes): %d%%", xs->size, - (int)((100.0 * (xs->rcvd + xs->offset)) / xs->size)); + (int)((100.0 * xs->rcvd) / xs->size)); } void @@ -137,7 +137,7 @@ stat_start(struct xferstat *xs, char *name, off_t size, off_t offset) xs->end = xs->last; xs->size = size; xs->offset = offset; - xs->rcvd = 0; + xs->rcvd = offset; stat_display(xs, 1); }