Browse Source

Fixed uninitialized variables. callback2 is not yet initialized.

Frank Zago 16 years ago
parent
commit
5352496bad
1 changed files with 2 additions and 1 deletions
  1. 2 1
      client/AdventureMapButton.cpp

+ 2 - 1
client/AdventureMapButton.cpp

@@ -317,6 +317,7 @@ CHighlightableButton::CHighlightableButton( const CFunctionList<void()> &onSelec
 }
 
 CHighlightableButton::CHighlightableButton( const std::pair<std::string, std::string> help, const CFunctionList<void()> &onSelect, int x, int y, const std::string &defName, int myid, int key/*=0*/, std::vector<std::string> * add /*= NULL*/, bool playerColoredButton /*= false */ )
+: onlyOn(false), selected(false) // TODO: callback2(???)
 {
 	ID = myid;
 	std::map<int,std::string> pom;
@@ -607,4 +608,4 @@ void CSlider::setAmount( int to )
 {
 	positions = to - capacity;
 	amax(positions, 1);
-}
+}