From: hniksic Date: Fri, 10 Nov 2000 16:20:55 +0000 (-0800) Subject: [svn] Fix off-by-one error in comind(). X-Git-Tag: v1.13~2388 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=e18ca280fb9d1aceb269f1fb104c557abc14dfa2 [svn] Fix off-by-one error in comind(). Published in . --- diff --git a/src/ChangeLog b/src/ChangeLog index 181720a9..e050bbbd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2000-11-10 Hrvoje Niksic + + * init.c (comind): Initialize MAX to array size - 1. + 2000-11-08 Hrvoje Niksic * url.c (construct): Changed last_slash[-1] to *(last_slash - 1). diff --git a/src/init.c b/src/init.c index f96f41b9..38b065fa 100644 --- a/src/init.c +++ b/src/init.c @@ -174,7 +174,7 @@ static struct { static int comind (const char *com) { - int min = 0, max = ARRAY_SIZE (commands); + int min = 0, max = ARRAY_SIZE (commands) - 1; do {