Skip to content

Commit

Permalink
Fixed bug #36046 (parse_ini_file() miscounts lines in multi-line valu…
Browse files Browse the repository at this point in the history
…es).
  • Loading branch information
Ilia Alshanetsky committed Jan 17, 2006
1 parent 52933fc commit b6cb9d3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Zend/zend_ini_scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,18 @@ NEWLINE ("\r"|"\n"|"\r\n")


<INITIAL>["][^"]*["] {
char *p = yytext;

/* ENCAPSULATED TC_STRING */

while ((p = strpbrk(p, "\r\n"))) {
if (*p == '\r' && *(p + 1) == '\n') {
p++;
}
SCNG(lineno)++;
p++;
}

/* eat trailing " */
yytext[yyleng-1]=0;

Expand Down

0 comments on commit b6cb9d3

Please sign in to comment.