]> sjero.net Git - wget/commitdiff
[svn] Fix off-by-one error in comind().
authorhniksic <devnull@localhost>
Fri, 10 Nov 2000 16:20:55 +0000 (08:20 -0800)
committerhniksic <devnull@localhost>
Fri, 10 Nov 2000 16:20:55 +0000 (08:20 -0800)
Published in <sxsvgtvdcki.fsf@florida.arsdigita.de>.

src/ChangeLog
src/init.c

index 181720a96cbdbb0e307de0ec5f65ef4047913d9f..e050bbbd3ed3ada9bde425ea9fc43ef032b2bf0f 100644 (file)
@@ -1,3 +1,7 @@
+2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * init.c (comind): Initialize MAX to array size - 1.
+
 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * url.c (construct): Changed last_slash[-1] to *(last_slash - 1).
index f96f41b96492e83192c58146291ad230b9526e27..38b065faeef4900d92ae3c04c7720bb539d92c71 100644 (file)
@@ -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
     {