From fa95a279f6d950cdf85a1c4444d275554d99ce23 Mon Sep 17 00:00:00 2001 From: ondrej Date: Thu, 16 Apr 2020 06:27:33 +0000 Subject: [PATCH] IDE: Locals Dialog: support special chars in extracting raw strings (fpDebug) git-svn-id: trunk@62994 - --- debugger/localsdlg.pp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/debugger/localsdlg.pp b/debugger/localsdlg.pp index cee0380df9..b74a6b6d69 100644 --- a/debugger/localsdlg.pp +++ b/debugger/localsdlg.pp @@ -150,10 +150,22 @@ var begin Inc(I); xNum := ''; - while (I <= M) and (AValue[I] in ['0'..'9']) do - begin - xNum := xNum + AValue[I]; // not really fast, but OK for this purpose + if (I <= M) and (AValue[I]='$') then + begin // hex + xNum := xNum + AValue[I]; Inc(I); + while (I <= M) and (AValue[I] in ['0'..'9', 'A'..'F', 'a'..'f']) do + begin + xNum := xNum + AValue[I]; // not really fast, but OK for this purpose + Inc(I); + end; + end else + begin // dec + while (I <= M) and (AValue[I] in ['0'..'9']) do + begin + xNum := xNum + AValue[I]; // not really fast, but OK for this purpose + Inc(I); + end; end; if TryStrToInt(xNum, xCharOrd) then begin