From 311acd5b58bb9ce15612978ff0f76d225a359cf8 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 18 May 2015 20:11:13 +0000 Subject: [PATCH] fpdebug: check for bounds, before accessing git-svn-id: trunk@49086 - --- components/fpdebug/fpdbgdwarf.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/fpdebug/fpdbgdwarf.pas b/components/fpdebug/fpdbgdwarf.pas index fb7056341e..f987b06740 100644 --- a/components/fpdebug/fpdbgdwarf.pas +++ b/components/fpdebug/fpdbgdwarf.pas @@ -2648,7 +2648,8 @@ begin end; exit; end; - Result := t2.OrdHighBound - t2.OrdLowBound + 1; + if t2.HasBounds then + Result := Integer(t2.OrdHighBound - t2.OrdLowBound + 1); end; function TFpDwarfValueArray.GetMemberCountEx(AIndex: array of Int64): Integer; @@ -3505,7 +3506,7 @@ begin InitLocParserData.ObjectDataAddrPush := False; if assigned(AValueObj) and LocationFromTag(DW_AT_upper_bound, AValueObj, AnAddress, @InitLocParserData, InformationEntry, True) then begin FHighBoundState := rfConst; - FHighBoundConst := AnAddress.Address; + FHighBoundConst := Int64(AnAddress.Address); end else begin