mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Crash using benchspritesort with dimensions not divisible by 32 (#10743)
Fixes #10740
This commit is contained in:
@@ -952,7 +952,7 @@ void viewport_paint(
|
|||||||
if (recorded_sessions != nullptr)
|
if (recorded_sessions != nullptr)
|
||||||
{
|
{
|
||||||
const uint16_t columnSize = rightBorder - alignedX;
|
const uint16_t columnSize = rightBorder - alignedX;
|
||||||
const uint16_t columnCount = (columnSize / 32);
|
const uint16_t columnCount = (columnSize + 31) / 32;
|
||||||
recorded_sessions->resize(columnCount);
|
recorded_sessions->resize(columnCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user