mirror of
https://github.com/minetest/minetestmapper.git
synced 2025-06-28 14:46:01 +02:00
Fix crash if the total map size is smaller than the tile size;
This commit is contained in:
@ -439,10 +439,10 @@ void TileGenerator::createImage()
|
||||
m_mapWidth = (m_xMax - m_xMin + 1);
|
||||
m_mapHeight = (m_zMax - m_zMin + 1);
|
||||
|
||||
if (m_mapWidth > m_tileW)
|
||||
if (m_tileW < INT_MAX)
|
||||
m_mapWidth = m_tileW;
|
||||
|
||||
if (m_mapHeight > m_tileH)
|
||||
if (m_tileH < INT_MAX)
|
||||
m_mapHeight = m_tileH;
|
||||
|
||||
m_mapWidth *= 16;
|
||||
|
Reference in New Issue
Block a user