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
commit 1efd11e266
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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