[FL-3067] WeatherStation: fix incorrect history index increment (#2186)

This commit is contained in:
あく 2022-12-23 22:46:35 +09:00 committed by GitHub
parent dff73dfd38
commit b0970953b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,7 +303,7 @@ bool ws_view_receiver_input(InputEvent* event, void* context) {
ws_receiver->view, ws_receiver->view,
WSReceiverModel * model, WSReceiverModel * model,
{ {
if(model->idx != model->history_item - 1) model->idx++; if(model->history_item && model->idx != model->history_item - 1) model->idx++;
}, },
true); true);
} else if(event->key == InputKeyLeft && event->type == InputTypeShort) { } else if(event->key == InputKeyLeft && event->type == InputTypeShort) {