From 571094912bb68af315a8c53f79b58c06805da929 Mon Sep 17 00:00:00 2001 From: Mattias Gaertner Date: Thu, 1 Nov 2018 23:23:34 +0000 Subject: [PATCH] fcl-passrc: fixed error position on include file not found git-svn-id: trunk@40171 - --- packages/fcl-passrc/src/pscanner.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fcl-passrc/src/pscanner.pp b/packages/fcl-passrc/src/pscanner.pp index 98de61e171..5cb904db30 100644 --- a/packages/fcl-passrc/src/pscanner.pp +++ b/packages/fcl-passrc/src/pscanner.pp @@ -3079,7 +3079,6 @@ end; procedure TPascalScanner.HandleIncludeFile(Param: String); begin - PushStackItem; if Length(Param)>1 then begin if (Param[1]='''') then @@ -3092,6 +3091,7 @@ begin FCurSourceFile := FileResolver.FindIncludeFile(Param); if not Assigned(FCurSourceFile) then Error(nErrIncludeFileNotFound, SErrIncludeFileNotFound, [Param]); + PushStackItem; FCurFilename := Param; if FCurSourceFile is TFileLineReader then FCurFilename := TFileLineReader(FCurSourceFile).Filename; // nicer error messages