Skip to content

Commit

Permalink
Core/Battleground/SOTA: Initialize uninitialized variables.
Browse files Browse the repository at this point in the history
Fixes:

==8111== Conditional jump or move depends on uninitialised value(s)
==8111==    at 0x12B542C: BattlegroundSA::FillInitialWorldStates(WorldPacket&) (BattlegroundSA.cpp:421)
==8111==    by 0xF93CD9: Player::SendInitWorldStates(unsigned int, unsigned int) (Player.cpp:9664)'

And similar.
  • Loading branch information
Machiavell1 committed Mar 28, 2012
1 parent 91228d2 commit cc0448a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
Expand Up @@ -37,6 +37,11 @@ BattlegroundSA::BattlegroundSA()
SignaledRoundTwo = false; SignaledRoundTwo = false;
SignaledRoundTwoHalfMin = false; SignaledRoundTwoHalfMin = false;
InitSecondRound = false; InitSecondRound = false;

//! This is here to prevent an uninitialised variable warning
//! The warning only occurs when SetUpBattleGround fails though.
//! In the future this function should be called BEFORE sending initial worldstates.
memset(&GraveyardStatus, 0, sizeof(GraveyardStatus));
} }


BattlegroundSA::~BattlegroundSA() BattlegroundSA::~BattlegroundSA()
Expand Down

1 comment on commit cc0448a

@Vasago
Copy link

@Vasago Vasago commented on cc0448a Mar 28, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow thank you for these memory leaks fixed it is nice to see somebody care about it :)

How is movements problems going? Need any help?

Can you look also at this crash? Happened after recent changes - crash immediatelly after server starts http://paste2.org/p/1956052

Is thre any way how to PM some people in Github? It seems they emoved this option ...

Please sign in to comment.