瀏覽代碼

Fixed a null pointer crash in r13463 (thanks to Ramsey for reporting it).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13467 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage 16 年之前
父節點
當前提交
9c255d04a4
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/map/clif.c

+ 2 - 2
src/map/clif.c

@@ -259,7 +259,7 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target
 		iter = mapit_getallusers();
 		while( (tsd = (TBL_PC*)mapit_next(iter)) != NULL )
 		{
-			if( sd->bl.m == tsd->bl.m && packet_db[tsd->packet_ver][RBUFW(buf,0)].len )
+			if( bl->m == tsd->bl.m && packet_db[tsd->packet_ver][RBUFW(buf,0)].len )
 			{ // packet must exist for the client version
 				WFIFOHEAD(tsd->fd, len);
 				memcpy(WFIFOP(tsd->fd,0), buf, len);
@@ -384,7 +384,7 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target
 		iter = mapit_getallusers();
 		while( (tsd = (TBL_PC*)mapit_next(iter)) != NULL )
 		{
-			if( type == DUEL_WOS && sd->bl.id == tsd->bl.id )
+			if( type == DUEL_WOS && bl->id == tsd->bl.id )
 				continue;
 			if( sd->duel_group == tsd->duel_group && packet_db[tsd->packet_ver][RBUFW(buf,0)].len )
 			{ // packet must exist for the client version