From: Steven Schubiger Date: Sun, 17 May 2009 10:53:28 +0000 (+0200) Subject: Fix wrong human-readable ETA output. X-Git-Tag: v1.13~359 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=2e1619d3fed0bb49a03b787b5c2c7ff0d1eb0f10 Fix wrong human-readable ETA output. --- diff --git a/src/ChangeLog b/src/ChangeLog index 5039f49e..31170b70 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-05-17 Steven Schubiger + + * progress.c (eta_to_human_short): Fix the remaining hours + to be displayed. Spotted by Tadeu Martins (#26411). + 2009-04-24 Micah Cowan * hash.c: Change stdint.h inclusion to use HAVE_STDINT_H, not C99 diff --git a/src/progress.c b/src/progress.c index 2f1c2225..9b9d1e49 100644 --- a/src/progress.c +++ b/src/progress.c @@ -1157,7 +1157,7 @@ eta_to_human_short (int secs, bool condensed) else if (secs < 48 * 3600) sprintf (buf, "%dh%s%dm", secs / 3600, space, (secs / 60) % 60); else if (secs < 100 * 86400) - sprintf (buf, "%dd%s%dh", secs / 86400, space, (secs / 3600) % 60); + sprintf (buf, "%dd%s%dh", secs / 86400, space, (secs / 3600) % 24); else /* even (2^31-1)/86400 doesn't overflow BUF. */ sprintf (buf, "%dd", secs / 86400);