From 83c655266dd1f9ba3ddbdf9389edbce4d30740a3 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 22 Nov 2014 23:09:50 +0100 Subject: [PATCH] more robust against unknown line info --- compiler/cgen.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/cgen.nim b/compiler/cgen.nim index b00c0b0a7a..51c426d792 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -284,7 +284,7 @@ proc genLineDir(p: BProc, t: PNode) = line.toRope, makeCString(toFilename(t.info))) elif ({optLineTrace, optStackTrace} * p.options == {optLineTrace, optStackTrace}) and - (p.prc == nil or sfPure notin p.prc.flags): + (p.prc == nil or sfPure notin p.prc.flags) and t.info.fileIndex >= 0: linefmt(p, cpsStmts, "nimln($1, $2);$n", line.toRope, t.info.quotedFilename)