瀏覽代碼

- Added a check when joining a chat to make sure the target object is of type BL_CHAT.

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

+ 3 - 0
Changelog-Trunk.txt

@@ -3,6 +3,9 @@ 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/07/04
+	* Added a check when joining a chat to make sure the target object is of
+	  type BL_CHAT. [Skotlex]
 2006/07/03
 	* Cleared up the bAutoSpellWhenHit description in doc/item_bonus.txt
 	  [Skotelx]

+ 1 - 1
src/map/chat.c

@@ -81,7 +81,7 @@ int chat_joinchat (struct map_session_data *sd, int chatid, char* pass)
  //a wrong chat id can be received. [Skotlex]
 	if (cd == NULL)
 		return 1;
-	if (cd->bl.m != sd->bl.m || sd->vender_id || sd->chatID || cd->limit <= cd->users) {
+	if (cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m || sd->vender_id || sd->chatID || cd->limit <= cd->users) {
 		clif_joinchatfail(sd,0);
 		return 0;
 	}