summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--src/map/guild.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0baeab557..a5eb6ded9 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,10 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/06/06
+ * [Fixed]:
+ - Allocation of event_list in guild_npc_request_info to aCalloc so
+ memcpy(ev->name,event,strlen(event)) will have a null terminator. [Lance]
2006/06/05
* Fixed a crash when using SL_SMA and the "combo" ain't ready. [Skotlex]
* Hopefully fixed changing a mob's class causing them to get all sort of
diff --git a/src/map/guild.c b/src/map/guild.c
index 5364fb8bd..80d1e2fde 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -482,8 +482,8 @@ int guild_npc_request_info(int guild_id,const char *event)
if(event==NULL || *event==0)
return guild_request_info(guild_id);
- ev=(struct eventlist *)aMalloc(sizeof(struct eventlist));
- memcpy(ev->name,event,strlen(event));
+ ev=(struct eventlist *)aCalloc(sizeof(struct eventlist));
+ memcpy(ev->name,event,strlen(event) + 1);
//The one in the db becomes the next event from this.
ev->next=idb_put(guild_infoevent_db,guild_id,ev);
return guild_request_info(guild_id);