Browse Source

fix off-by-one error and do not use magic constant of 100 when checking StackPost

Michael Vogt 13 years ago
parent
commit
26d5b68a00
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apt-pkg/contrib/configuration.cc

+ 1 - 1
apt-pkg/contrib/configuration.cc

@@ -811,7 +811,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool const &AsSectio
 	    // Go down a level
 	    if (TermChar == '{')
 	    {
-	       if (StackPos <= 100)
+	       if (StackPos < sizeof(Stack)/sizeof(std::string))
 		  Stack[StackPos++] = ParentTag;
 	       
 	       /* Make sectional tags incorperate the section into the