Debugger: Memory Tools - Fixed edit label action changing the start address on multi-byte labels

This commit is contained in:
Sour 2020-04-21 21:23:10 -04:00
parent 73ef5f21e9
commit f5c7bf4358

View file

@ -55,7 +55,13 @@ namespace Mesen.GUI.Debugger.Controls
public static void EditLabel(UInt32 address, AddressType type)
{
CodeLabel existingLabel = LabelManager.GetLabel(address, type);
CodeLabel newLabel = new CodeLabel() { Address = address, AddressType = type, Label = existingLabel?.Label, Comment = existingLabel?.Comment, Length = existingLabel?.Length ?? 1 };
CodeLabel newLabel = new CodeLabel() {
Address = existingLabel?.Address ?? address,
AddressType = existingLabel?.AddressType ?? type,
Label = existingLabel?.Label,
Comment = existingLabel?.Comment,
Length = existingLabel?.Length ?? 1
};
frmEditLabel frm = new frmEditLabel(newLabel, existingLabel);
if(frm.ShowDialog() == DialogResult.OK) {