Fix bug where line number was off by one when using defaults.h.

This fixes the compco11.c test case.
This commit is contained in:
Stephen Heumann 2016-10-15 20:52:10 -05:00
parent b019c59803
commit 4247eb2c91

View File

@ -1198,7 +1198,10 @@ fp^.next := fileList;
fileList := fp;
fp^.name := includeFileGS;
fp^.sname := sourceFileGS;
fp^.lineNumber := lineNumber+1;
if default then
fp^.lineNumber := lineNumber
else
fp^.lineNumber := lineNumber+1;
if OpenFile(true, default) then begin {open a new file and proceed from there}
lineNumber := 1;
StartInclude(@includeFileGS);