1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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);