1
0

Fixed up a few valgrind warnings

( http://forum.mc-server.org/showthread.php?tid=598&pid=5071#pid5071 )

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1010 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-10-25 19:20:29 +00:00
parent d24aebe68e
commit 2c9e187189
3 changed files with 10 additions and 8 deletions

View File

@ -39,7 +39,7 @@ cByteBuffer::cByteBuffer(int a_BufferSize) :
cByteBuffer::~cByteBuffer() cByteBuffer::~cByteBuffer()
{ {
delete m_Buffer; delete[] m_Buffer;
} }

View File

@ -55,6 +55,7 @@ cChunkSender::~cChunkSender()
bool cChunkSender::Start(cWorld * a_World) bool cChunkSender::Start(cWorld * a_World)
{ {
m_ShouldTerminate = false;
m_World = a_World; m_World = a_World;
return super::Start(); return super::Start();
} }

View File

@ -217,12 +217,13 @@ cWorld::~cWorld()
cWorld::cWorld( const AString & a_WorldName ) cWorld::cWorld(const AString & a_WorldName) :
: m_SpawnMonsterTime( 0.f ) m_SpawnMonsterTime(0.f),
, m_RSList ( 0 ) m_RSList(0),
, m_Weather ( eWeather_Sunny ) m_Weather(eWeather_Sunny),
m_WeatherInterval(24000) // Guaranteed 1 day of sunshine at server start :)
{ {
LOG("cWorld::cWorld(%s)", a_WorldName.c_str()); LOGD("cWorld::cWorld(%s)", a_WorldName.c_str());
m_WorldName = a_WorldName; m_WorldName = a_WorldName;
m_IniFileName = m_WorldName + "/world.ini"; m_IniFileName = m_WorldName + "/world.ini";
@ -303,7 +304,7 @@ cWorld::cWorld( const AString & a_WorldName )
// Save any changes that the defaults may have done to the ini file: // Save any changes that the defaults may have done to the ini file:
if (!IniFile.WriteFile()) if (!IniFile.WriteFile())
{ {
LOG("WARNING: Could not write to %s", m_IniFileName.c_str()); LOGWARNING("Could not write world config to %s", m_IniFileName.c_str());
} }
} }