Crash using benchspritesort with dimensions not divisible by 32 (#10743)

Fixes #10740
This commit is contained in:
ζeh Matt authored and GitHub committed 2020-02-19 21:50:13 +01:00
1 parent ae814571df
commit 1272c0c043
1 file changed
+1 -1
+1 -1
View File
@@ -952,7 +952,7 @@ void viewport_paint(
if (recorded_sessions != nullptr)
{
const uint16_t columnSize = rightBorder - alignedX;
const uint16_t columnCount = (columnSize / 32);
const uint16_t columnCount = (columnSize + 31) / 32;
recorded_sessions->resize(columnCount);
}