mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Fix missing limit check for block y pos (#14320)
This commit is contained in:
@@ -71,6 +71,9 @@ std::unique_ptr<MapBlock> MapSector::createBlankBlockNoInsert(s16 y)
|
||||
{
|
||||
assert(getBlockBuffered(y) == nullptr); // Pre-condition
|
||||
|
||||
if (blockpos_over_max_limit(v3s16(0, y, 0)))
|
||||
throw InvalidPositionException("createBlankBlockNoInsert(): pos over max mapgen limit");
|
||||
|
||||
v3s16 blockpos_map(m_pos.X, y, m_pos.Y);
|
||||
|
||||
return std::make_unique<MapBlock>(blockpos_map, m_gamedef);
|
||||
|
Reference in New Issue
Block a user