@@ -430,7 +430,7 @@ int npc_event_doall(const char* name)
430
430
int npc_event_doall_id (const char * name , int rid )
431
431
{
432
432
int c = 0 ;
433
- char buf [64 ];
433
+ char buf [EVENT_NAME_LENGTH ];
434
434
safesnprintf (buf , sizeof (buf ), "::%s" , name );
435
435
ev_db -> foreach (ev_db ,npc_event_doall_sub ,& c ,buf ,rid );
436
436
return c ;
@@ -445,7 +445,7 @@ int npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data)
445
445
static struct tm ev_tm_b ; // tracks previous execution time
446
446
time_t timer ;
447
447
struct tm * t ;
448
- char buf [64 ];
448
+ char buf [EVENT_NAME_LENGTH ];
449
449
int c = 0 ;
450
450
451
451
timer = time (NULL );
@@ -3550,7 +3550,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c
3550
3550
int l ;
3551
3551
ARR_FIND ( 0 , MAX_EVENTQUEUE , l , sd -> eventqueue [l ][0 ] == '\0' );
3552
3552
if ( l < MAX_EVENTQUEUE ) {
3553
- safestrncpy (sd -> eventqueue [l ],eventname ,50 ); //Event enqueued.
3553
+ safestrncpy (sd -> eventqueue [l ],eventname ,EVENT_NAME_LENGTH ); //Event enqueued.
3554
3554
return 0 ;
3555
3555
}
3556
3556
@@ -4380,9 +4380,9 @@ void npc_read_event_script(void)
4380
4380
DBIterator * iter ;
4381
4381
DBKey key ;
4382
4382
DBData * data ;
4383
+ char name [EVENT_NAME_LENGTH ];
4383
4384
4384
- char name [64 ]= "::" ;
4385
- safestrncpy (name + 2 ,config [i ].event_name ,62 );
4385
+ safesnprintf (name ,EVENT_NAME_LENGTH ,"::%s" ,config [i ].event_name );
4386
4386
4387
4387
script_event [i ].event_count = 0 ;
4388
4388
iter = db_iterator (ev_db );
0 commit comments