ZoneDebug.exe crash when I build
I set up a test server, when i use the precompiled .exe I get no errors and everything seems to work fine. When I download the source and compile my own .exe, I can't get the world server to run, it always throws an "stack around variable "queries" corrupt. Also when I use my compiled Zonedebug.exe the .exe crashes when I hail an NPC. It seems to be at this method:
int Parser::numtok(string text, const char * character) {
string::iterator iterator = text.begin();
int returnvalue=0;
while(*iterator) {
if (*iterator == *character) returnvalue++;
iterator++;
}
return returnvalue;
}
I changed the while(*iterator) to while(i < text.length()) and replaced *iterator in the loop with text[i]. This seemed to fix the hailing crash (NPC's still don't respond to quest's) but now i get an exception when it does a CastToClient(), seems to be when it is trying to add me into the aggro list. Everything works perfect including quests when I used a precompiled .exe so I am ruling out everything except for either my Visual Studio's Express Edition is screwed up, or something I am missing in the source. Does anyone have any idea's what i could be doing wrong?
|