From ac7f43304f81c485fd22c75a2756ffc8834a9ffa Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Tue, 1 Mar 2011 14:03:15 +0000 Subject: [PATCH] Input Widget - check string length before attempting to check for "oem", fixes crash made by my last fix --- BizHawk.MultiClient/config/InputWidget.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BizHawk.MultiClient/config/InputWidget.cs b/BizHawk.MultiClient/config/InputWidget.cs index 9c1f540050..fdb9c813b0 100644 --- a/BizHawk.MultiClient/config/InputWidget.cs +++ b/BizHawk.MultiClient/config/InputWidget.cs @@ -93,8 +93,11 @@ namespace BizHawk.MultiClient if ((modifiers & Keys.Alt) != 0) str += "ALT + "; str += key.ToString(); - if (str.Substring(0, 3) == "Oem") - str = str.Substring(3, str.Length - 3); + if (str.Length > 3) + { + if (str.Substring(0, 3) == "Oem") + str = str.Substring(3, str.Length - 3); + } return str; } public Keys key;