소스 검색

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

あく 3 년 전
부모
커밋
b0970953b9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      applications/plugins/weather_station/views/weather_station_receiver.c

+ 1 - 1
applications/plugins/weather_station/views/weather_station_receiver.c

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