Skip to content

Commit 033aff0

Browse files
authored
NeoUI - Bump up keybinds array (#1240)
* Add assert to also catch out if it reaches past the array limit * fixes #1239
1 parent 123625b commit 033aff0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/game/client/neo/ui/neo_root_settings.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ void NeoSettingsInit(NeoSettings *ns)
195195
bind->bcDefault = BUTTON_CODE_NONE;
196196
}
197197
}
198+
AssertMsg(keys->iBindsSize < ARRAYSIZE(keys->vBinds), "Bump the size of the vBinds array");
198199
}
199200

200201
CUtlBuffer bufDef(0, 0, CUtlBuffer::TEXT_BUFFER | CUtlBuffer::READ_ONLY);

src/game/client/neo/ui/neo_root_settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct NeoSettings
7474
ButtonCode_t bcCurrent; // Only used for unbinding
7575
ButtonCode_t bcDefault;
7676
};
77-
Bind vBinds[64];
77+
Bind vBinds[96];
7878
int iBindsSize = 0;
7979

8080
// Will be checked often so cached

0 commit comments

Comments
 (0)