mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Fix divide by zero when there is no scenery (#24371)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
- Fix: [#24346] Possible crash during line drawing in OpenGL mode.
|
||||
- Fix: [#24353] ‘Show dirty visuals’ is off by one pixel and does not work correctly with higher framerates.
|
||||
- Fix: [#24362] When upgrading from an older version on Windows, old versions of official objects are not always removed.
|
||||
- Fix: [#24371] Fix divide by zero in the scenery window when there is no scenery.
|
||||
|
||||
0.4.22 (2025-05-04)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -1372,7 +1372,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
int32_t GetMaxTabCountInARow()
|
||||
{
|
||||
int32_t tabEntries = static_cast<int32_t>(_tabEntries.size());
|
||||
return std::min(tabEntries, MaxTabsPerRow);
|
||||
return std::clamp(tabEntries, 1, MaxTabsPerRow);
|
||||
}
|
||||
|
||||
void PrepareWidgets()
|
||||
|
||||
Reference in New Issue
Block a user