Fix: Restore the behaviour when entering numbers in query windows: clamp integers out of range to the maximum valid value.

This commit is contained in:
frosch
2025-05-16 12:22:00 +02:00
committed by frosch
parent c1389c77b2
commit 2926179d02
14 changed files with 20 additions and 20 deletions

View File

@@ -748,7 +748,7 @@ struct TimetableWindow : Window {
if (!str.has_value()) return;
const Vehicle *v = this->vehicle;
uint64_t val = ParseInteger<uint64_t>(*str).value_or(0);
uint64_t val = ParseInteger<uint64_t>(*str, 10, true).value_or(0);
auto [order_id, mtf] = PackTimetableArgs(v, this->sel_index, query_widget == WID_VT_CHANGE_SPEED);
switch (query_widget) {