aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-15 15:57:31 -0600
committermegamage <none@none>2009-03-15 15:57:31 -0600
commit3de99d25ff41553e6452de3af36b12082e4947a4 (patch)
treede8913b7506ca0f6c605b0d3958e20da303d6a66 /src
parentbd67615f5fc3c583beadadd351de792983b14558 (diff)
*Fix an uninitialized variable which may cause crash.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index d729ec1f182..0650190daaf 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -811,7 +811,7 @@ void Aura::_AddAura()
// Try find slot for aura
uint8 slot = NULL_AURA_SLOT;
// Lookup for auras already applied from spell
- for(uint8 i = 0; i < 3; i++)
+ for(uint8 i = 0; i < 3; ++i)
{
Unit::spellEffectPair spair = Unit::spellEffectPair(GetId(), i);
for(Unit::AuraMap::const_iterator itr = m_target->GetAuras().lower_bound(spair); itr != m_target->GetAuras().upper_bound(spair); ++itr)
@@ -831,7 +831,7 @@ void Aura::_AddAura()
Unit::VisibleAuraMap const *visibleAuras = m_target->GetVisibleAuras();
if(visibleAuras->size() < MAX_AURAS || slot < MAX_AURAS) // got free slot
{
- AuraSlotEntry * entry;
+ AuraSlotEntry *entry = NULL;
// Lookup free slot
if (!secondaura)
@@ -852,8 +852,8 @@ void Aura::_AddAura()
entry->m_Level=(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
entry->m_spellId = GetId();
//init pointers-prevent unexpected behaviour
- for(uint8 i = 0; i < 3; i++)
- entry->m_slotAuras[i]=NULL;
+ for(uint8 i = 0; i < 3; ++i)
+ entry->m_slotAuras[i] = NULL;
}
else
entry = m_target->GetVisibleAura(slot);