@@ -221,4 +221,28 @@ void meal_pager_set_max_values(void* context) {
221
221
app -> max_pager = 999 ;
222
222
break ;
223
223
}
224
+ if (app -> first_station > app -> max_station ) {
225
+ app -> first_station = app -> max_station ;
226
+ snprintf (app -> text_store [0 ], 5 , "%lu" , app -> first_station );
227
+ }
228
+ if (app -> last_station > app -> max_station ) {
229
+ app -> last_station = app -> max_station ;
230
+ snprintf (app -> text_store [1 ], 5 , "%lu" , app -> last_station );
231
+ }
232
+ if (app -> last_station < app -> first_station ) {
233
+ app -> last_station = app -> first_station ;
234
+ snprintf (app -> text_store [1 ], 5 , "%lu" , app -> last_station );
235
+ }
236
+ if (app -> first_pager > app -> max_pager ) {
237
+ app -> first_pager = app -> max_pager ;
238
+ snprintf (app -> text_store [2 ], 4 , "%lu" , app -> first_pager );
239
+ }
240
+ if (app -> last_pager > app -> max_pager ) {
241
+ app -> last_pager = app -> max_pager ;
242
+ snprintf (app -> text_store [3 ], 4 , "%lu" , app -> last_pager );
243
+ }
244
+ if (app -> last_pager < app -> first_pager ) {
245
+ app -> last_pager = app -> first_pager ;
246
+ snprintf (app -> text_store [3 ], 4 , "%lu" , app -> last_pager );
247
+ }
224
248
}
0 commit comments