From 3bf2d8f00bb7db4b80053389b8dff437a4450dec Mon Sep 17 00:00:00 2001 From: goyuken Date: Sat, 4 Apr 2015 00:20:28 +0000 Subject: [PATCH] fix an apple II controller crash problem introduced in r9264 --- .../Base Implementations/ControllerDefinition.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs b/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs index 5e3b198733..e5d70240d2 100644 --- a/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs +++ b/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs @@ -122,7 +122,7 @@ namespace BizHawk.Emulation.Common for (int i = 0; i < list.Count; i++) { int player = 0; - if (list[i].StartsWith("P") && char.IsNumber(list[i][1])) + if (list[i].Length > 3 && list[i].StartsWith("P") && char.IsNumber(list[i][1])) player = int.Parse(list[i][1].ToString()); ret[player].Add(list[i]); }