From: Jochen Roderburg Date: Sat, 6 Aug 2011 21:28:42 +0000 (+0200) Subject: Ensure it doesn't print more IPs than available ones. X-Git-Tag: v1.13~1 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=c25d0f6997df75d73264a5d6de71cdeee3ba40d7 Ensure it doesn't print more IPs than available ones. --- diff --git a/src/ChangeLog b/src/ChangeLog index 1b42b020..d7934d72 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-06 Jochen Roderburg + + * host.c (lookup_host): Ensure it doesn't print more IPs than available + ones. + 2011-08-06 Giuseppe Scrivano * init.c (defaults): Set default value for show_all_dns_entries. diff --git a/src/host.c b/src/host.c index 505f706c..86f107a3 100644 --- a/src/host.c +++ b/src/host.c @@ -828,8 +828,8 @@ lookup_host (const char *host, int flags) int i; int printmax = al->count; - if (! opt.show_all_dns_entries) - printmax = 3; + if (!opt.show_all_dns_entries && printmax > 3) + printmax = 3; for (i = 0; i < printmax; i++) {