TAStudio - account for a button name of "P" rather than assume it is a player number indicator, fixes issue #431

This commit is contained in:
adelikat 2015-06-21 16:13:35 +00:00
parent ae4881356e
commit 46feea39cd
1 changed files with 6 additions and 1 deletions

View File

@ -893,10 +893,15 @@ namespace BizHawk.Client.EmuHawk
(sender.OwnerItem as ToolStripMenuItem).ShowDropDown();
};
if (column.Name.StartsWith("P") && char.IsNumber(column.Name, 1))
if (column.Name.StartsWith("P") && column.Name.Length > 1 && char.IsNumber(column.Name, 1))
{
player = int.Parse(column.Name[1].ToString());
}
else
{
player = 0;
}
playerMenus[player].DropDownItems.Add(menuItem);
}