浏览代码

- Small fix in npc-created chat rooms to properly include the terminating 0 on the chat's event.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6537 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 年之前
父节点
当前提交
20ebb32eb0
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/chat.c

+ 2 - 0
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

+ 1 - 1
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){