mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-01 17:41:17 +00:00
fixes yet another index out of bounds issue in renderer.nim
This commit is contained in:
@@ -811,8 +811,8 @@ proc gident(g: var TSrcGen, n: PNode) =
|
||||
|
||||
var t: TTokType
|
||||
var s = atom(g, n)
|
||||
if (s[0] in lexer.SymChars):
|
||||
if (n.kind == nkIdent):
|
||||
if s.len > 0 and s[0] in lexer.SymChars:
|
||||
if n.kind == nkIdent:
|
||||
if (n.ident.id < ord(tokKeywordLow) - ord(tkSymbol)) or
|
||||
(n.ident.id > ord(tokKeywordHigh) - ord(tkSymbol)):
|
||||
t = tkSymbol
|
||||
|
||||
Reference in New Issue
Block a user