aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2015-01-18 16:08:49 +1000
committerCraig Robbins <kde.psych@gmail.com>2015-01-18 20:30:57 +1000
commit29514918f81e50e9a87659dd930f4e8369d73041 (patch)
treecddfa9afbeb42e0931f3ae249a920c439110e3fc /src
parentdb3466dbe885f27b87ceca0a4bb115169f844a0c (diff)
downloadminetest-29514918f81e50e9a87659dd930f4e8369d73041.tar.gz
minetest-29514918f81e50e9a87659dd930f4e8369d73041.tar.bz2
minetest-29514918f81e50e9a87659dd930f4e8369d73041.zip
Fix particles causing unitialised data being used due to use of incorrect union member
Diffstat (limited to 'src')
-rw-r--r--src/particles.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/particles.cpp b/src/particles.cpp
index b32ec1542..603e38cdd 100644
--- a/src/particles.cpp
+++ b/src/particles.cpp
@@ -433,11 +433,11 @@ void ParticleManager::handleParticleEvent(ClientEvent *event, IGameDef *gamedef,
{
JMutexAutoLock lock(m_spawner_list_lock);
- if (m_particle_spawners.find(event->delete_particlespawner.id) !=
+ if (m_particle_spawners.find(event->add_particlespawner.id) !=
m_particle_spawners.end())
{
- delete m_particle_spawners.find(event->delete_particlespawner.id)->second;
- m_particle_spawners.erase(event->delete_particlespawner.id);
+ delete m_particle_spawners.find(event->add_particlespawner.id)->second;
+ m_particle_spawners.erase(event->add_particlespawner.id);
}
}
video::ITexture *texture =
@@ -475,7 +475,7 @@ void ParticleManager::handleParticleEvent(ClientEvent *event, IGameDef *gamedef,
JMutexAutoLock lock(m_spawner_list_lock);
m_particle_spawners.insert(
std::pair<u32, ParticleSpawner*>(
- event->delete_particlespawner.id,
+ event->add_particlespawner.id,
toadd));
}