Debugger: Fix label validation (now correctly prevents spaces, etc.)

This commit is contained in:
Souryo 2016-12-02 21:57:59 -05:00
parent 4b97345b8f
commit 0f9b817976

View file

@ -48,7 +48,7 @@ namespace Mesen.GUI.Debugger
&& (sameAddress == null || sameAddress == _originalLabel)
&& (_originalLabel != null || txtLabel.Text.Length > 0 || txtComment.Text.Length > 0)
&& !txtComment.Text.Contains('\x1') && !txtComment.Text.Contains('\x2')
&& (txtLabel.Text.Length == 0 || Regex.IsMatch(txtLabel.Text, "^[@_a-zA-Z]+[@_a-zA-Z0-9]*"));
&& (txtLabel.Text.Length == 0 || Regex.IsMatch(txtLabel.Text, "^[@_a-zA-Z]+[@_a-zA-Z0-9]*$"));
}
protected override void OnFormClosed(FormClosedEventArgs e)