From 3626fe74da263fb816dbeebe1d48b448a0192bda Mon Sep 17 00:00:00 2001 From: "jean.chalard" Date: Tue, 2 Dec 2008 14:34:02 +0000 Subject: [PATCH] J : * Fix an improbable bug. --- JGE/src/hge/hgeparticle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/JGE/src/hge/hgeparticle.cpp b/JGE/src/hge/hgeparticle.cpp index ba2d74859..58f9a3754 100644 --- a/JGE/src/hge/hgeparticle.cpp +++ b/JGE/src/hge/hgeparticle.cpp @@ -141,7 +141,8 @@ void hgeParticleSystem::Update(float fDeltaTime) if(par->fAge >= par->fTerminalAge) { nParticlesAlive--; - memcpy(par, &particles[nParticlesAlive], sizeof(hgeParticle)); + if (par != &particles[nParticlesAlive]) + memcpy(par, &particles[nParticlesAlive], sizeof(hgeParticle)); i--; continue; }