2
0
Эх сурвалжийг харах

Fix potentially uninintialized variables

Ivan Savenko 1 жил өмнө
parent
commit
c99d4b959e

+ 1 - 1
client/lobby/SelectionTab.cpp

@@ -155,12 +155,12 @@ SelectionTab::SelectionTab(ESelectionScreen Type)
 	OBJ_CONSTRUCTION;
 		
 	generalSortingBy = getSortBySelectionScreen(tabType);
+	sortingBy = _format;
 
 	bool enableUiEnhancements = settings["general"]["enableUiEnhancements"].Bool();
 
 	if(tabType != ESelectionScreen::campaignList)
 	{
-		sortingBy = _format;
 		background = std::make_shared<CPicture>(ImagePath::builtin("SCSELBCK.bmp"), 0, 6);
 		pos = background->pos;
 		inputName = std::make_shared<CTextInput>(inputNameRect, Point(-32, -25), ImagePath::builtin("GSSTRIP.bmp"), 0);

+ 1 - 1
lib/CGameInterface.h

@@ -71,7 +71,7 @@ using TTeleportExitsList = std::vector<std::pair<ObjectInstanceID, int3>>;
 class DLL_LINKAGE CBattleGameInterface : public IBattleEventsReceiver
 {
 public:
-	bool human;
+	bool human = false;
 	PlayerColor playerID;
 	std::string dllName;