1
0
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:
sfan5
2024-01-30 21:51:51 +01:00
committed by GitHub
parent e1f6108789
commit 9da1354f3a
2 changed files with 19 additions and 26 deletions

View File

@@ -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);