Fixed a few out-of-bounds reads
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1465 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -407,9 +407,12 @@ void cLightingThread::PrepareSkyLight(void)
|
||||
}
|
||||
|
||||
// Add Current as a seed:
|
||||
int CurrentIdx = idx + Current * BlocksPerYLayer;
|
||||
m_IsSeed1[CurrentIdx] = true;
|
||||
m_SeedIdx1[m_NumSeeds++] = CurrentIdx;
|
||||
if (Current < cChunkDef::Height)
|
||||
{
|
||||
int CurrentIdx = idx + Current * BlocksPerYLayer;
|
||||
m_IsSeed1[CurrentIdx] = true;
|
||||
m_SeedIdx1[m_NumSeeds++] = CurrentIdx;
|
||||
}
|
||||
|
||||
// Add seed from Current up to the highest neighbor:
|
||||
for (int y = Current + 1, Index = idx + y * BlocksPerYLayer; y < MaxNeighbor; y++, Index += BlocksPerYLayer)
|
||||
|
||||
Reference in New Issue
Block a user