Fix seg fault when configuring controller

Since controllerAction can be -2 (line 2105)
This commit is contained in:
Steve Wills 2021-02-14 14:06:37 -05:00
parent e35c56ceb3
commit a666de46aa

View File

@ -2166,7 +2166,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
// Print bindings, including seperator (-) between them
CFont::SetScale(MENU_X(0.25f), MENU_Y(SMALLESTTEXT_Y_SCALE));
for (; contSetOrder < MAX_SETORDERS && controllerAction != -1; contSetOrder++) {
for (; contSetOrder < MAX_SETORDERS && controllerAction >= 0; contSetOrder++) {
wchar *settingText = ControlsManager.GetControllerSettingTextWithOrderNumber((e_ControllerAction)controllerAction, (eContSetOrder)contSetOrder);
if (settingText) {
++bindingsForThisOpt;