fix debug zeroth particle (#352)

This commit is contained in:
Mark Theng 2016-11-08 06:43:20 +08:00 committed by jacob1
parent 477d2be92c
commit 3a3254f38b

View File

@ -32,7 +32,7 @@ void ParticleDebug::Debug(int mode, int x, int y)
}
else if (mode == 1)
{
if (x < 0 || x >= XRES || y < 0 || y >= YRES || !(i = (sim->pmap[y][x]>>8)) || i < debug_currentParticle)
if (x < 0 || x >= XRES || y < 0 || y >= YRES || !sim->pmap[y][x] || (i = (sim->pmap[y][x]>>8)) < debug_currentParticle)
{
i = NPART;
logmessage << "Updated particles from #" << debug_currentParticle << " to end, updated sim";