don't crash in Bk2MnemonicConstants on a "P" key from a keyboard
This commit is contained in:
parent
2d2a770a7c
commit
159f1d9da2
|
@ -9,7 +9,7 @@ namespace BizHawk.Client.Common
|
|||
get
|
||||
{
|
||||
var key = button.Replace("Key ", "");
|
||||
if (key.StartsWith("P") && key[1] >= '0' && key[1] <= '9')
|
||||
if (key.StartsWith("P") && key.Length > 1 && key[1] >= '0' && key[1] <= '9')
|
||||
key = key.Substring(3);
|
||||
|
||||
if (SystemOverrides.ContainsKey(Global.Emulator.SystemId) && SystemOverrides[Global.Emulator.SystemId].ContainsKey(key))
|
||||
|
|
Loading…
Reference in New Issue