summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Helfferich <[email protected]>2016-04-25 06:55:33 -0500
committerJulian Helfferich <[email protected]>2016-04-25 06:55:33 -0500
commit1f9e0767013daab580926b9c7b884275fef0f5a7 (patch)
tree91027fdee108fde7572fc5bff5cd537e16905c59
parent2c10cda9b7428699ca5fd6af3db26549260d8282 (diff)
Fix Coverity #76279: Uninitialized member variables
Member variables mpGame and mSendLength were uninitialized in the constructor of KBlocksNetPlayer. mpGame is now set to nullptr and mSendLength to 0.
-rw-r--r--KBlocksNetPlayer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/KBlocksNetPlayer.cpp b/KBlocksNetPlayer.cpp
index 262aa06..c6f471a 100644
--- a/KBlocksNetPlayer.cpp
+++ b/KBlocksNetPlayer.cpp
@@ -16,7 +16,9 @@ KBlocksNetPlayer::KBlocksNetPlayer(GamePlayerInterface *player, const string &se
mpNetClient = new KBlocksNetClient(serverIP.c_str(), localPort);
mpPlayer = player;
+ mpGame = nullptr;
+ mSendLength = 0;
mActionList.clear();
}