mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-27 17:11:40 +00:00
fix crash due to errant symbols in nim.cfg (#13073) [backport]
(cherry picked from commit 56fb909676)
This commit is contained in:
@@ -160,8 +160,9 @@ proc checkSymbol(L: TLexer, tok: TToken) =
|
||||
|
||||
proc parseAssignment(L: var TLexer, tok: var TToken;
|
||||
config: ConfigRef; condStack: var seq[bool]) =
|
||||
if tok.ident.s == "-" or tok.ident.s == "--":
|
||||
confTok(L, tok, config, condStack) # skip unnecessary prefix
|
||||
if tok.ident != nil:
|
||||
if tok.ident.s == "-" or tok.ident.s == "--":
|
||||
confTok(L, tok, config, condStack) # skip unnecessary prefix
|
||||
var info = getLineInfo(L, tok) # save for later in case of an error
|
||||
checkSymbol(L, tok)
|
||||
var s = $tok
|
||||
|
||||
Reference in New Issue
Block a user