Fixed max array size check

This commit is contained in:
Emanuele Conti 2023-01-26 14:55:15 +00:00
parent 411855ce81
commit 884a751ae7
2 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ static bool hid_mouse_jiggler_input_callback(InputEvent* event, void* context) {
consumed = true;
}
if(event->type == InputTypePress && event->key == InputKeyRight && !model->running &&
model->interval_idx < LENGTH(intervals)) {
model->interval_idx < LENGTH(intervals) - 1) {
model->interval_idx++;
consumed = true;
}

View File

@ -105,7 +105,7 @@ static bool hid_mouse_jiggler_input_callback(InputEvent* event, void* context) {
consumed = true;
}
if(event->type == InputTypePress && event->key == InputKeyRight && !model->running &&
model->interval_idx < LENGTH(intervals)) {
model->interval_idx < LENGTH(intervals) - 1) {
model->interval_idx++;
consumed = true;
}