1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Fix progress bar assertion

This commit is contained in:
Darshit Shah 2014-11-15 00:13:13 +05:30
parent 897ef07712
commit 94805ad55a
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2014-11-15 Darshit Shah <darnir@gmail.com>
* progress.c (create_image): Fix assertion that checks progress bar length
Should fix bug #43593
2014-11-12 Tim Ruehsen <tim.ruehsen@gmx.de>
* openssl.c (ssl_init): Fix error handling for CRL loading

View File

@ -1158,7 +1158,15 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done)
while (p - bp->buffer - bytes_cols_diff < bp->width)
*p++ = ' ';
*p = '\0';
assert (count_cols (bp->buffer) <= bp->width);
/* 2014-11-14 Darshit Shah <darnir@gmail.com>
* Assert that the length of the progress bar is lesser than the size of the
* screen with which we are dealing. This assertion *MUST* always be removed
* from the release code since we do not want Wget to crash and burn when the
* assertion fails. Instead Wget should continue downloading and display a
* horrible and irritating progress bar that spams the screen with newlines.
*/
assert (count_cols (bp->buffer) <= bp->width + 1);
}
/* Print the contents of the buffer as a one-line ASCII "image" so