mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-07 10:02:24 +02:00
no negatives
This commit is contained in:
parent
3850271b97
commit
d15527dd04
1 changed files with 2 additions and 2 deletions
|
@ -1256,7 +1256,7 @@ float UserInputMapper::getActionState(Action action) const {
|
|||
Locker locker(_lock);
|
||||
|
||||
int index = toInt(action);
|
||||
if (index < _actionStates.size()) {
|
||||
if (index >= 0 && index < _actionStates.size()) {
|
||||
return _actionStates[index];
|
||||
}
|
||||
|
||||
|
@ -1268,7 +1268,7 @@ bool UserInputMapper::getActionStateValid(Action action) const {
|
|||
Locker locker(_lock);
|
||||
|
||||
int index = toInt(action);
|
||||
if (index < _actionStatesValid.size()) {
|
||||
if (index >= 0 && index < _actionStatesValid.size()) {
|
||||
return _actionStatesValid[index];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue