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:
parent
e1f6108789
commit
9da1354f3a
2 changed files with 19 additions and 26 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue