From 6410bb30d4fddbadf08fc52bc6b34fb4d6f2d1a3 Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Fri, 24 Aug 2012 14:38:49 -0400 Subject: [PATCH] Error point accuracy --- mystic/mpl_compile.pas | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mystic/mpl_compile.pas b/mystic/mpl_compile.pas index 30553d8..1878e94 100644 --- a/mystic/mpl_compile.pas +++ b/mystic/mpl_compile.pas @@ -260,6 +260,8 @@ Begin End; Procedure TParserEngine.Error (ErrNum: Byte; Str: String); +Var + LastLineCol : SmallInt; Begin If UpdateInfo.ErrorType > 0 Then Exit; @@ -275,6 +277,8 @@ Begin Case InFile[CurFile].DataFile.Read of #10 : Begin Inc (UpdateInfo.ErrorLine); + + LastLineCol := UpdateInfo.ErrorCol; UpdateInfo.ErrorCol := 0; End; #09, @@ -284,6 +288,12 @@ Begin End; End; End; + + If (UpdateInfo.ErrorCol = 0) and (UpdateInfo.ErrorLine > 1) Then Begin + Dec (UpdateInfo.ErrorLine); + + UpdateInfo.ErrorCol := LastLineCol + 1; + End; End; Function TParserEngine.CurFilePos : LongInt;