summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index 5296f5970..365461593 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1730,7 +1730,7 @@ int guild_addcastleinfoevent(int castle_id,int index,const char *name)
return 0;
ev = (struct eventlist *)aMalloc(sizeof(struct eventlist));
- memcpy(ev->name,name,sizeof(ev->name));
+ strncpy(ev->name,name,ARRAYLENGTH(ev->name));
//The next event becomes whatever was currently stored.
ev->next = (struct eventlist *)idb_put(guild_castleinfoevent_db,code,ev);
return 0;