From 473e65ba01a1593ac40853fb3ab8d087390604ce Mon Sep 17 00:00:00 2001 From: juha Date: Sat, 12 Dec 2020 18:45:29 +0000 Subject: [PATCH] =?UTF-8?q?IDE:=20Prevent=20an=20infinite=20loop=20when=20?= =?UTF-8?q?comparing=20files.=20Issue=20#38185,=20patch=20from=20Domingo?= =?UTF-8?q?=20Galm=C3=A9s.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: trunk@64199 - --- ide/diffpatch.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ide/diffpatch.pas b/ide/diffpatch.pas index 4142fedd7e..ac89b2e972 100644 --- a/ide/diffpatch.pas +++ b/ide/diffpatch.pas @@ -616,6 +616,8 @@ begin // chomp empty lines at end fPart1.GetPrevLineExtends(Cur1); fPart2.GetPrevLineExtends(Cur2); + if (Cur1.LineNumber < 1) or (Cur2.LineNumber < 1) then + break; until not LinesAreEqual(Cur1,Cur2); end; end;