diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-11-19 13:42:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 13:42:16 +0100 |
commit | 1efd11e2666403fecf1b9b3b933c1adca13d8069 (patch) | |
tree | 43d68b06cadb211efaaa4e1e6796c0db07e35bf4 | |
parent | 1bcc3521371ec6a8c136e42d902a0be7c50d9745 (diff) | |
download | Nim-1efd11e2666403fecf1b9b3b933c1adca13d8069.tar.gz |
fixes #15942 [backport:1.2] [backport:1.4] (#16051)
-rw-r--r-- | compiler/cgen.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim index f0120c435..c2a31b775 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -244,7 +244,7 @@ proc safeLineNm(info: TLineInfo): int = proc genCLineDir(r: var Rope, filename: string, line: int; conf: ConfigRef) = assert line >= 0 - if optLineDir in conf.options: + if optLineDir in conf.options and line > 0: r.addf("$N#line $2 $1$N", [rope(makeSingleLineCString(filename)), rope(line)]) |