From 0b328ad5de0c180a436dff5a022e4eda34b4f72f Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 10 Mar 2021 22:49:50 +0000 Subject: [PATCH] GdbmiDebugger: Fixed broken string compare optimization git-svn-id: trunk@64782 - --- components/lazdebuggergdbmi/gdbtypeinfo.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lazdebuggergdbmi/gdbtypeinfo.pp b/components/lazdebuggergdbmi/gdbtypeinfo.pp index 567e97d946..ba97adb41a 100644 --- a/components/lazdebuggergdbmi/gdbtypeinfo.pp +++ b/components/lazdebuggergdbmi/gdbtypeinfo.pp @@ -2413,7 +2413,7 @@ var while true do begin while (j <= l) and (S2[j] in ['^','(', ' ']) do inc(j); - if StrLIComp('array ', @S2[j], 6) = 0 then begin + if (j <= l) and (StrLIComp('array ', @S2[j], 6) = 0) then begin inc(j, 5+3); while (j <= l) and not ( (S2[j-3] = ' ') and (S2[j-2] in ['o','O']) and (S2[j-1] in ['f','F']) and (S2[j] = ' ') ) @@ -2423,7 +2423,7 @@ var end; break; end; - if (StrLIComp('record ', @S2[j], 7) = 0) and + if (j <= l) and (StrLIComp('record ', @S2[j], 7) = 0) and not( (copy(S2, j+7, 1) = ';') or (copy(S2, j+7, 6) = '{...};') ) then begin i := 1;