mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
Don't return negative numbers from the flex tokenizer
Fixes #1374. Closes #2129.
This commit is contained in:
parent
f3c85f9eb3
commit
1ad19232c4
@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
1
tests/lang/parse-fail-uft8.nix
Normal file
1
tests/lang/parse-fail-uft8.nix
Normal file
@ -0,0 +1 @@
|
||||
123 é 4
|
Loading…
Reference in New Issue
Block a user