FpDebug: Fix calculating length of open array param

git-svn-id: trunk@62018 -
This commit is contained in:
martin 2019-10-10 01:01:43 +00:00
parent a43265e3af
commit 6fb009a232

View File

@ -884,15 +884,14 @@ begin
if UpperBoundSym <> nil then begin if UpperBoundSym <> nil then begin
val := UpperBoundSym.Value; val := UpperBoundSym.Value;
TFpValueDwarf(val).Context := Context; TFpValueDwarf(val).Context := Context;
//l := t2.OrdLowBound;
h := Val.AsInteger; h := Val.AsInteger;
val.ReleaseReference; val.ReleaseReference;
if h > l then begin if h >= 0 then begin
{$PUSH}{$Q-} {$PUSH}{$Q-}
if QWord(h - l) > 5000 then if QWord(h) > 5000 - 1 then
h := l + 5000; h := 5000 - 1;
{$POP} {$POP}
Result := h - l + 1; Result := h + 1;
end end
else else
Result := 0; Result := 0;