EOZ (-1) not a space char.
Fix bug with endless loop at not ended \z sequence.
```
local function lexerror (s, err)
local st, msg = load('return ' .. s, '')
if err ~= '<eof>' then err = err .. "'" end
assert(not st and string.find(msg, "near .-" .. err))
end
lexerror("'alo \\z \n\n", "<eof>")
```
This commit is contained in:
@@ -198,7 +198,7 @@ public class LexState extends Constants {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isspace(int c) {
|
private boolean isspace(int c) {
|
||||||
return (c <= ' ');
|
return (c >= 0 && c <= ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user