1
0

Fixed possible crash in the NetherClumpFoliage finisher.

This commit is contained in:
STRWarrior 2014-07-23 11:02:42 +02:00
parent dfadcf7453
commit 9080f14dc2

View File

@ -125,6 +125,11 @@ void cFinishGenNetherClumpFoliage::TryPlaceClump(cChunkDesc & a_ChunkDesc, int a
float zz = (float) a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z; float zz = (float) a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z;
for (int y = a_RelY - 2; y < a_RelY + 2; y++) for (int y = a_RelY - 2; y < a_RelY + 2; y++)
{ {
if ((y < 1) || (y > cChunkDef::Height))
{
continue;
}
if (a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_AIR) // Don't replace non air blocks. if (a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_AIR) // Don't replace non air blocks.
{ {
continue; continue;