From: <ma...@us...> - 2013-12-18 12:09:12
|
Revision: 9080 http://sourceforge.net/p/planeshift/code/9080 Author: magodra Date: 2013-12-18 12:09:09 +0000 (Wed, 18 Dec 2013) Log Message: ----------- Fixed a few uninitialzied values. Modified Paths: -------------- trunk/src/common/net/netbase.cpp trunk/src/npcclient/gem.cpp trunk/src/npcclient/gem.h trunk/src/npcclient/npc.cpp Modified: trunk/src/common/net/netbase.cpp =================================================================== --- trunk/src/common/net/netbase.cpp 2013-12-17 22:14:29 UTC (rev 9079) +++ trunk/src/common/net/netbase.cpp 2013-12-18 12:09:09 UTC (rev 9080) @@ -233,7 +233,7 @@ //there was a failure in conversion if null if(!inet_ntop(addr.sin6_family,&addr.sin6_addr, addrText, sizeof(addrText))) { - strncpy(addrText, "UNKNOWN", INET_ADDRSTRLEN); + strncpy(addrText, "UNKNOWN", INET6_ADDRSTRLEN); } #else char addrText[INET_ADDRSTRLEN]; Modified: trunk/src/npcclient/gem.cpp =================================================================== --- trunk/src/npcclient/gem.cpp 2013-12-17 22:14:29 UTC (rev 9079) +++ trunk/src/npcclient/gem.cpp 2013-12-18 12:09:09 UTC (rev 9080) @@ -58,7 +58,8 @@ //------------------------------------------------------------------------------- gemNPCObject::gemNPCObject(psNPCClient* npcclient, EID id) - :eid(id), visible(true), invincible(false), instance(DEFAULT_INSTANCE) + :pcmesh(NULL), eid(id), type(0), visible(true), invincible(false), + isAlive(true), instance(DEFAULT_INSTANCE) { } Modified: trunk/src/npcclient/gem.h =================================================================== --- trunk/src/npcclient/gem.h 2013-12-17 22:14:29 UTC (rev 9079) +++ trunk/src/npcclient/gem.h 2013-12-18 12:09:09 UTC (rev 9080) @@ -92,7 +92,6 @@ { return eid; } - npcMesh* pcmesh; int GetType() { @@ -168,6 +167,8 @@ return instance; }; + npcMesh* pcmesh; + protected: static csRef<iMeshFactoryWrapper> nullfact; Modified: trunk/src/npcclient/npc.cpp =================================================================== --- trunk/src/npcclient/npc.cpp 2013-12-17 22:14:29 UTC (rev 9079) +++ trunk/src/npcclient/npc.cpp 2013-12-18 12:09:09 UTC (rev 9080) @@ -874,7 +874,7 @@ { csVector3 loc; iSector* sector; - float rot; + float rot = 0.0; InstanceID instance = INSTANCE_ALL; if(npcActor) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |