fix crash due to errant symbols in nim.cfg (#13073) [backport]
This commit is contained in:
parent
5e9ebe9ec1
commit
56fb909676
1 changed files with 3 additions and 2 deletions
|
|
@ -160,8 +160,9 @@ proc checkSymbol(L: TLexer, tok: TToken) =
|
||||||
|
|
||||||
proc parseAssignment(L: var TLexer, tok: var TToken;
|
proc parseAssignment(L: var TLexer, tok: var TToken;
|
||||||
config: ConfigRef; condStack: var seq[bool]) =
|
config: ConfigRef; condStack: var seq[bool]) =
|
||||||
if tok.ident.s == "-" or tok.ident.s == "--":
|
if tok.ident != nil:
|
||||||
confTok(L, tok, config, condStack) # skip unnecessary prefix
|
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
|
var info = getLineInfo(L, tok) # save for later in case of an error
|
||||||
checkSymbol(L, tok)
|
checkSymbol(L, tok)
|
||||||
var s = $tok
|
var s = $tok
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue