]> jfr.im git - irc/ircd-hybrid/bopm.git/commitdiff
config.c:
authorandy <redacted>
Tue, 29 Jan 2002 17:31:20 +0000 (17:31 +0000)
committerandy <redacted>
Tue, 29 Jan 2002 17:31:20 +0000 (17:31 +0000)
Now we've added a zero element on the config hash we need to adjust
the sizes..

config.c

index fe038f8b52b395c129e8561999e3d73fbb2cb563..06a58259072f74eaae549a944091a8c9b96fdf8e 100644 (file)
--- a/config.c
+++ b/config.c
@@ -106,7 +106,7 @@ void config_load(char *filename)
      }
     
     /* Clear anything we have already */
-    for(i = 0; i < (sizeof(hash) / sizeof(config_hash)); i++)
+    for(i = 0; i < (sizeof(hash) / sizeof(config_hash) - 1); i++)
       {
          switch(hash[i].type)
           { 
@@ -136,7 +136,7 @@ void config_load(char *filename)
 
             args = clean(args); /* Strip leading and tailing spaces */
 
-            for(i = 0; i < (sizeof(hash) / sizeof(config_hash)); i++)
+            for(i = 0; i < (sizeof(hash) / sizeof(config_hash) - 1); i++)
               if(!strcasecmp(key, hash[i].key))
                 {
                       switch(hash[i].type)
@@ -163,7 +163,7 @@ void config_checkreq()
       int i;
       int errfnd = 0;
 
-      for(i = 0; i < (sizeof(hash) / sizeof(config_hash)); i++)
+      for(i = 0; i < (sizeof(hash) / sizeof(config_hash) - 1); i++)
         if(hash[i].req && !hash[i].reqmet)
          {               
             log("CONFIG -> Parameter [%s] required but not defined in config.", hash[i].key);