summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/chat.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index f5017f67e..a0c609b1f 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/09
+ * Small fix in npc-created chat rooms to properly include the terminating 0
+ on the chat's event. [Skotlex]
* Fixed Fog of Wall's symmetry in respect to Misc attacks, they no longer
get reduced by 50% regardless of who is standing on the fog. [Skotlex]
* monster_ai&2 will now trigger the rude-attacked skill when the mob can't
diff --git a/src/map/chat.c b/src/map/chat.c
index 03aba375c..311fe1d8e 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -290,7 +290,7 @@ int chat_createnpcchat(struct npc_data *nd,int limit,int pub,int trigger,char* t
memcpy(cd->npc_event,ev,49);
cd->npc_event[49] = '\0';
} else
- memcpy(cd->npc_event,ev,strlen(ev));
+ memcpy(cd->npc_event,ev,strlen(ev)+1); //Include the \0
cd->bl.id = map_addobject(&cd->bl);
if(cd->bl.id==0){