From 5e86e63b37c08c8e5e574053412c3093a28c0a0c Mon Sep 17 00:00:00 2001 From: sinf Date: Fri, 3 Apr 2015 14:55:10 +0300 Subject: [PATCH] Fixed parsing of hotkeys with no name (such as tilde) --- OpenRA.Game/Input/Hotkey.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Input/Hotkey.cs b/OpenRA.Game/Input/Hotkey.cs index 1d82fda5b5..ea70df2e23 100755 --- a/OpenRA.Game/Input/Hotkey.cs +++ b/OpenRA.Game/Input/Hotkey.cs @@ -28,7 +28,12 @@ namespace OpenRA Keycode key; if (!Enum.TryParse(parts[0], true, out key)) - return false; + { + int c; + if (!int.TryParse(parts[0], out c)) + return false; + key = (Keycode)c; + } var mods = Modifiers.None; if (parts.Length >= 2)