diff --git a/GUI.NET/Debugger/Controls/ctrlHexViewer.cs b/GUI.NET/Debugger/Controls/ctrlHexViewer.cs index 0334e693..1fbfd337 100644 --- a/GUI.NET/Debugger/Controls/ctrlHexViewer.cs +++ b/GUI.NET/Debugger/Controls/ctrlHexViewer.cs @@ -172,7 +172,7 @@ namespace Mesen.GUI.Debugger.Controls int currentAddr = (int)(this.ctrlHexBox.CurrentLine - 1) * this.ctrlHexBox.BytesPerLine; address.Address = (UInt32)currentAddr; - frmGoToLine frm = new frmGoToLine(address); + frmGoToLine frm = new frmGoToLine(address, (_byteProvider.Length - 1).ToString("X").Length); frm.StartPosition = FormStartPosition.Manual; Point topLeft = this.PointToScreen(new Point(0, 0)); frm.Location = new Point(topLeft.X + (this.Width - frm.Width) / 2, topLeft.Y + (this.Height - frm.Height) / 2); diff --git a/GUI.NET/Debugger/Controls/ctrlScrollableTextbox.cs b/GUI.NET/Debugger/Controls/ctrlScrollableTextbox.cs index 1b506858..1a55fd7e 100644 --- a/GUI.NET/Debugger/Controls/ctrlScrollableTextbox.cs +++ b/GUI.NET/Debugger/Controls/ctrlScrollableTextbox.cs @@ -506,7 +506,7 @@ namespace Mesen.GUI.Debugger address.Address = (UInt32)currentAddr; - frmGoToLine frm = new frmGoToLine(address); + frmGoToLine frm = new frmGoToLine(address, 4); frm.StartPosition = FormStartPosition.Manual; Point topLeft = this.PointToScreen(new Point(0, 0)); frm.Location = new Point(topLeft.X + (this.Width - frm.Width) / 2, topLeft.Y + (this.Height - frm.Height) / 2); diff --git a/GUI.NET/Debugger/frmGoToLine.cs b/GUI.NET/Debugger/frmGoToLine.cs index d5cdedf4..e00aa4a8 100644 --- a/GUI.NET/Debugger/frmGoToLine.cs +++ b/GUI.NET/Debugger/frmGoToLine.cs @@ -13,12 +13,14 @@ namespace Mesen.GUI.Debugger { public partial class frmGoToLine : BaseConfigForm { - public frmGoToLine(GoToAddress address) + public frmGoToLine(GoToAddress address, int charLimit) { InitializeComponent(); Entity = address; AddBinding("Address", txtAddress); + + txtAddress.MaxLength = charLimit; } protected override void OnShown(EventArgs e)