Skip to content

Commit

Permalink
Merge pull request #24 from nim-lang/devel
Browse files Browse the repository at this point in the history
fix crash due to errant symbols in nim.cfg (nim-lang#13073) [backport]
  • Loading branch information
sthagen authored Jan 9, 2020
2 parents 71eb2ee + 56fb909 commit b80885f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/nimconf.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b80885f

Please sign in to comment.