mirror of
https://github.com/NixOS/nix
synced 2025-06-28 22:01:15 +02:00
Don't return negative numbers from the flex tokenizer
Fixes #1374. Closes #2129.
This commit is contained in:
parent
f3c85f9eb3
commit
1ad19232c4
2 changed files with 6 additions and 1 deletions
|
@ -209,7 +209,11 @@ or { return OR_KW; }
|
|||
\#[^\r\n]* /* single-line comments */
|
||||
\/\*([^*]|\*+[^*/])*\*+\/ /* long comments */
|
||||
|
||||
{ANY} return yytext[0];
|
||||
{ANY} {
|
||||
/* Don't return a negative number, as this will cause
|
||||
Bison to stop parsing without an error. */
|
||||
return (unsigned char) yytext[0];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue