Not sure this is the right place for these....
I was running World under Valgrind (memory leak checker) and found a couple of "trivial" bugs.
common/linked_list.h
Code:
template<class TYPE>
LinkedList<TYPE>::LinkedList()
{
list_destructor_invoked = false;
first = 0;
count = 0;
dont_delete = false; // ADDED this line
}
Note that the destructor for this class checks that dont_delete is false, so this prevents it ever being called with an unitialised value.
world/net.cpp
in main(), from line 238:
Code:
if (!zoneserver_list.worldclock.loadFile(EQTIME_INI))
LogFile->write(EQEMuLog::Error, "Unable to load %s", EQTIME_INI);
char tmp[20];
tmp[0]=0x00;// ADDED this
database.GetVariable("holdzones",tmp, 20);
This one gets rid of a possible error in common/database.cpp.
It's actually pretty solid without this, but this improves the style... if anyone cares.
These two fixes make Valgrind report no errors outside libc for world.