mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2024-12-25 17:41:56 +01:00
Fix integer underflow in the WUPSConfigItemMultipleValues
This commit is contained in:
parent
44f373d3e2
commit
0d80bd2183
@ -91,9 +91,8 @@ void WUPSConfigItemMultipleValues::onSelected(bool isSelected) {
|
|||||||
void WUPSConfigItemMultipleValues::onButtonPressed(WUPSConfigButtons buttons) {
|
void WUPSConfigItemMultipleValues::onButtonPressed(WUPSConfigButtons buttons) {
|
||||||
uint32_t previousValue = valueIndex;
|
uint32_t previousValue = valueIndex;
|
||||||
if(buttons & WUPS_CONFIG_BUTTON_LEFT) {
|
if(buttons & WUPS_CONFIG_BUTTON_LEFT) {
|
||||||
|
if(valueIndex != 0){
|
||||||
valueIndex--;
|
valueIndex--;
|
||||||
if(valueIndex < 0) {
|
|
||||||
valueIndex = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(buttons & WUPS_CONFIG_BUTTON_RIGHT && values.size() > 0) {
|
if(buttons & WUPS_CONFIG_BUTTON_RIGHT && values.size() > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user