Commit 5fcfec82 authored by Keith Fieldhouse's avatar Keith Fieldhouse Committed by Marcus D. Hanwell

Fix a function ptr parsing problem.

An unecesary index increment caused the parser to mis-handle
the "(*" string when trying to parse function pointers.  This
fix is per- Dave Gobbi.
parent 7d44529b
......@@ -2510,7 +2510,7 @@ YY_RULE_SETUP
int j;
while (yytext[i]==' ' || yytext[i]=='\t' ||
yytext[i]=='\r' || yytext[i]=='\n') { i++; }
i++; j = i;
j = i;
while (yytext[j]!='*') { j++; }
yylval.str = (char *)malloc(j-i+1);
if (j > i) { strncpy(yylval.str, &yytext[i], j-i); }
......
......@@ -348,7 +348,7 @@ Modify lex.yy.c:
int j;
while (yytext[i]==' ' || yytext[i]=='\t' ||
yytext[i]=='\r' || yytext[i]=='\n') { i++; }
i++; j = i;
j = i;
while (yytext[j]!='*') { j++; }
yylval.str = (char *)malloc(j-i+1);
if (j > i) { strncpy(yylval.str, &yytext[i], j-i); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment