fixes #15942 [backport:1.2] [backport:1.4] (#16051)

This commit is contained in:
Andreas Rumpf
2020-11-19 13:42:16 +01:00
committed by GitHub
parent 1bcc352137
commit 1efd11e266

View File

@@ -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)])