1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-22 03:42:41 +01:00

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

@@ -486,7 +486,7 @@ struct ScriptSettingsWindow : public Window {
void OnQueryTextFinished(std::optional<std::string> str) override
{
if (!str.has_value()) return;
auto value = ParseInteger<int32_t>(*str);
auto value = ParseInteger<int32_t>(*str, 10, true);
if (!value.has_value()) return;
SetValue(*value);
}