From 8afda095398a6745e15a44ad5eb5ff45ed50dc2c Mon Sep 17 00:00:00 2001 From: Martin Date: Sun, 10 Nov 2024 22:57:23 +0100 Subject: [PATCH] FpDebug: Fixed MemManage read from register and sign extend (if register is smaller than expected source size) --- components/fpdebug/fpdmemorytools.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/fpdebug/fpdmemorytools.pas b/components/fpdebug/fpdmemorytools.pas index d18f9c84f1..090c274f14 100644 --- a/components/fpdebug/fpdmemorytools.pas +++ b/components/fpdebug/fpdmemorytools.pas @@ -2124,7 +2124,12 @@ begin FPartialReadResultLenght := SourceReadSize; if SourceReadSize > ConvData.SourceSize.Size then - SourceReadSize := ConvData.SourceSize.Size; + SourceReadSize := ConvData.SourceSize.Size + else + if SourceReadSize <= ConvData.SourceSize.Size then begin + ConvData.SourceSize := SizeVal(SourceReadSize); + ConvData.SourceFullSize := SourceReadSize; + end; ReadData := @TmpVal;