From 3a3254f38bbd76bdaa13661726abee0656ad6156 Mon Sep 17 00:00:00 2001 From: Mark Theng Date: Tue, 8 Nov 2016 06:43:20 +0800 Subject: [PATCH] fix debug zeroth particle (#352) --- src/debug/ParticleDebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug/ParticleDebug.cpp b/src/debug/ParticleDebug.cpp index 75a20aa72..6583626b8 100644 --- a/src/debug/ParticleDebug.cpp +++ b/src/debug/ParticleDebug.cpp @@ -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";