Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 8, 2023
2 parents 4f84b08 + 6c589c4 commit bb544bb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
4 changes: 3 additions & 1 deletion Cheat Engine/groupscancommandparser.pas
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ procedure TGroupscanCommandParser.parseToken(s: string);

elements[j].uservalue:=value;

if length(command)>=nextchar then
while length(command)>=nextchar do
begin
case command[nextchar] of
'P': elements[j].picked:=true; //elements marked picked will be added when doubleclicked in the addresslist
Expand All @@ -291,6 +291,8 @@ procedure TGroupscanCommandParser.parseToken(s: string);
else
raise exception.create(rsGSCPInvalidGroupscanCommand);
end;

inc(nextchar);
end;


Expand Down
31 changes: 17 additions & 14 deletions Cheat Engine/parsers.pas
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ function ConvertHexStrToRealStr(const s: string): string;
f: single;
d: double;
err: boolean;

su: string;
begin
if s='' then exit('');

Expand Down Expand Up @@ -455,9 +457,10 @@ function ConvertHexStrToRealStr(const s: string): string;

'(' :
begin
if copy(s,1,5)='(INT)' then
su:=uppercase(s);
if copy(su,1,5)='(INT)' then
begin
t:=copy(s,6);
t:=copy(su,6);
try
q:=StrToQWordEx(t);
result:='$'+inttohex(q,8);
Expand All @@ -466,27 +469,27 @@ function ConvertHexStrToRealStr(const s: string): string;
end;
end;

if copy(s,1,8)='(DOUBLE)' then
if copy(su,1,8)='(DOUBLE)' then
begin
t:=copy(s,9);
t:=copy(su,9);
val(t, d,j);
if j=0 then
begin
result:='$'+inttohex(PINT64(@d)^,8);

if s[1]='-' then
if su[1]='-' then
result:='-'+result;

if s[1]='+' then
if su[1]='+' then
result:='+'+result;

exit;
end;
end;

if copy(s,1,11)='(DOUBLE32L)' then
if copy(su,1,11)='(DOUBLE32L)' then
begin
t:=copy(s,12);
t:=copy(su,12);
val(t, d,j);
if j=0 then
begin
Expand All @@ -496,9 +499,9 @@ function ConvertHexStrToRealStr(const s: string): string;
end;
end;

if copy(s,1,11)='(DOUBLE32H)' then
if copy(su,1,11)='(DOUBLE32H)' then
begin
t:=copy(s,12);
t:=copy(su,12);
val(t, d,j);
if j=0 then
begin
Expand All @@ -508,18 +511,18 @@ function ConvertHexStrToRealStr(const s: string): string;
end;
end;

if copy(s,1,7)='(FLOAT)' then
if copy(su,1,7)='(FLOAT)' then
begin
t:=copy(s,8);
t:=copy(su,8);
val(t, f,j);
if j=0 then
begin
result:='$'+inttohex(pdword(@f)^,8);

if s[1]='-' then
if su[1]='-' then
result:='-'+result;

if s[1]='+' then
if su[1]='+' then
result:='+'+result;

exit;
Expand Down

0 comments on commit bb544bb

Please sign in to comment.