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

Fix more misc uninitialized vars

Ben Payne 10 жил өмнө
parent
commit
d97d44f66f

+ 2 - 0
Engine/source/T3D/gameBase/gameConnection.cpp

@@ -208,6 +208,8 @@ GameConnection::GameConnection()
 
    mAIControlled = false;
 
+   mLastPacketTime = 0;
+
    mDisconnectReason[0] = 0;
 
    //blackout vars

+ 1 - 0
Engine/source/core/dnet.cpp

@@ -66,6 +66,7 @@ ConnectionProtocol::ConnectionProtocol()
    mLastSendSeq = 0; // start sending at 1
    mAckMask = 0;
    mLastRecvAckAck = 0;
+   mConnectionEstablished = false;
 }
 void ConnectionProtocol::buildSendPacketHeader(BitStream *stream, S32 packetType)
 {

+ 2 - 2
Engine/source/platformWin32/menus/popupMenuWin32.cpp

@@ -158,7 +158,7 @@ void PopupMenu::createPlatformMenu()
    mData->mMenu = mIsPopup ? CreatePopupMenu() : CreateMenu();
    AssertFatal(mData->mMenu, "Unable to create menu");
 
-   MENUINFO mi;
+   MENUINFO mi = { 0 };
    mi.cbSize = sizeof(mi);
    mi.fMask = MIM_MENUDATA;
    mi.dwMenuData = (ULONG_PTR)this;
@@ -176,7 +176,7 @@ S32 PopupMenu::insertItem(S32 pos, const char *title, const char* accelerator)
    if(isAttached && pWindow == NULL)
       return -1;
 
-   MENUITEMINFOA mi;
+   MENUITEMINFOA mi = { 0 };
    mi.cbSize = sizeof(mi);
    mi.fMask = MIIM_ID|MIIM_TYPE;
    mi.wID = (mData->mMenuID * PlatformPopupMenuData::PopupMenuIDRange) + mData->mLastID + 1;

+ 1 - 0
Engine/source/sim/netConnection.cpp

@@ -351,6 +351,7 @@ void NetConnection::setNetClassGroup(U32 grp)
 }
 
 NetConnection::NetConnection()
+ : mNetAddress()
 {
    mTranslateStrings = false;
    mConnectSequence = 0;

+ 4 - 1
Engine/source/util/settings.h

@@ -78,7 +78,10 @@ public:
    String mValue;
    bool mIsGroup;
 
-   SettingSaveNode(){};
+   SettingSaveNode()
+   {
+      mIsGroup = false;
+   }
    SettingSaveNode(const String &name, bool isGroup = false)
    {
       mName = name;