SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,28 @@
--- parse.c.orig Mon Sep 17 08:48:30 2001
+++ parse.c Thu Jul 7 08:59:48 2011
@@ -355,14 +355,17 @@ read_file(fp, filename, page, line, preamble)
case CTL_TAB:
{
- int i = root->cti_value - 1;
- if (i < 0) {
- fprintf(stderr, "%s:%d: "
- "invalid tab index %d\n",
- filename, lineno, root->cti_value);
- exit(-1);
- }
- if (i >= MAXTAB) { /*XXX*/
+ int i;
+
+ if (root->ct_type == CTL_INT) {
+ i = root->cti_value - 1;
+ if (i < 0) {
+ fprintf(stderr, "%s:%d: "
+ "invalid tab index %d\n",
+ filename, lineno, root->cti_value);
+ exit(-1);
+ }
+ } else {
/* must be a string */
/* find a free entry */
for (i = MAXTAB ; i < MAXTAB + MAXSTYLE ; i++) {