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:
Enyby
2019-09-23 00:39:42 +03:00
parent 72a71e5a65
commit 0fa27c3783

View File

@@ -198,7 +198,7 @@ public class LexState extends Constants {
}
private boolean isspace(int c) {
return (c <= ' ');
return (c >= 0 && c <= ' ');
}