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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user