fix off by one while checking for the maximum number of tokens
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 30 Jun 2011 21:11:14 +0000 (21:11 +0000)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 21:08:02 +0000 (21:08 +0000)
webcit/subst.c

index 8f906076950f20b3ced933f30a498a4855b6e19f..49723377ae23f235662e81b9fb3e52a679063530 100644 (file)
@@ -1003,7 +1003,7 @@ WCTemplateToken *NewTemplateSubstitute(StrBuf *Buf,
                                                     &NewToken->Params[NewToken->nParameters - 1]))
                                {
                                        NewToken->HaveParameters = 1;
-                                       if (NewToken->nParameters > MAXPARAM) {
+                                       if (NewToken->nParameters >= MAXPARAM) {
                                                LogTemplateError(
                                                        NULL, "Parseerror", ERR_NAME, &TP,
                                                        "only [%d] Params allowed in Tokens",