summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 5ff5f06fd..2954dfddf 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6791,14 +6791,12 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
nullpo_retr(0, sd);
- Assert(strlen(name) < script_config.max_eventtimer_len);
-
for(i=0;i<MAX_EVENTTIMER;i++)
if( sd->eventtimer[i]==-1 )
break;
if(i<MAX_EVENTTIMER){
- char *evname=(char *)aCalloc(script_config.max_eventtimer_len,sizeof(char));
- memcpy(evname,name,script_config.max_eventtimer_len);
+ char *evname=(char *)aMalloc((strlen(name)+1)*sizeof(char));
+ memcpy(evname,name,(strlen(name)+1));
sd->eventtimer[i]=add_timer(gettick()+tick,
pc_eventtimer,sd->bl.id,(int)evname);
sd->eventcount++;