mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-11-16 07:30:28 +01:00
Fix crash if the total map size is smaller than the tile size;
This commit is contained in:
parent
fe5ba54fc9
commit
d41e6448ce
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user