Skip to content

Commit

Permalink
do not change address in hexview or disasmview when canceled out of t…
Browse files Browse the repository at this point in the history
…he goto address dialog
  • Loading branch information
pinchyCZN authored and pinchyCZN committed Nov 21, 2017
1 parent 798c7ae commit 544849f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Cheat Engine/MemoryBrowserFormUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2156,14 +2156,14 @@ procedure TMemoryBrowser.Goto1Click(Sender: TObject);
canceled: boolean;
old: ptruint;
begin
panel4.setfocus;
// old:=memoryaddress;

old:=hexview.SelectionStart;
if old=0 then old:=memoryaddress;

newaddress:=inputboxtop(rsGotoAddress, rsFillInTheAddressYouWantToGoTo, IntTohex(old, 8), true, canceled, memorybrowserHistory);

if(canceled)then
exit;

try
hexview.address:=getaddress(newaddress);
except
Expand All @@ -2174,7 +2174,6 @@ procedure TMemoryBrowser.Goto1Click(Sender: TObject);
hexview.history.Push(pointer(old));

hexview.SetFocus;

end;

procedure TMemoryBrowser.FormResize(Sender: TObject);
Expand Down Expand Up @@ -2426,6 +2425,9 @@ procedure TMemoryBrowser.Gotoaddress1Click(Sender: TObject);
begin
newaddress:=InputBoxTop(rsGotoAddress, rsFillInTheAddressYouWantToGoTo, IntTohex(disassemblerview.SelectedAddress, 8), true, canceled, memorybrowserHistory);

if(canceled)then
exit;

oldAddress:=disassemblerview.SelectedAddress;
try
disassemblerview.SelectedAddress:=symhandler.getaddressfromname(newaddress);
Expand Down

0 comments on commit 544849f

Please sign in to comment.