Duel allocation (#2734)
* Duels are now dynamically created and no longer statically consumes memory. * Removed max number of duel at once. * Updated duel modules for multi-thread and safer management. * Remove various statically allocated tab. * Removed duplicate code for npc_movenpc. * Fix few warnings. Thanks for suggestions from @anacondaqq.
This commit is contained in:
@@ -21520,8 +21520,8 @@ static void skill_readdb(void)
|
||||
skill_changematerial_count = skill_spellbook_count = skill_magicmushroom_count = 0;
|
||||
|
||||
for(i=0; i<ARRAYLENGTH(dbsubpath); i++){
|
||||
int n1 = strlen(db_path)+strlen(dbsubpath[i])+1;
|
||||
int n2 = strlen(db_path)+strlen(DBPATH)+strlen(dbsubpath[i])+1;
|
||||
size_t n1 = strlen(db_path)+strlen(dbsubpath[i])+1;
|
||||
size_t n2 = strlen(db_path)+strlen(DBPATH)+strlen(dbsubpath[i])+1;
|
||||
char* dbsubpath1 = (char*)aMalloc(n1+1);
|
||||
char* dbsubpath2 = (char*)aMalloc(n2+1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user