Kaynağa Gözat

Fix another crash

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@469 54d463be-8e91-2dee-dedb-b68131a5f0ec
amber 20 yıl önce
ebeveyn
işleme
9607a26f2b
2 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 2 0
      Changelog.txt
  2. 1 1
      src/map/battle.c

+ 2 - 0
Changelog.txt

@@ -1,5 +1,7 @@
 Date	Added
 12/5
+	* Fixed the range_check again to stop it from crashing 
+	  servers [MouseJstr]
 	* removed stubbed out unfinished atcommands as per Cameri [MouseJstr]
 	* Fixed nullpo's for gcc 2.95 [MouseJstr]
 	* Fixed bug in which login-txt was crashing in do_final() due to some free's [MC Cameri]

+ 1 - 1
src/map/battle.c

@@ -4962,7 +4962,7 @@ int battle_check_range(struct block_list *src,struct block_list *bl,int range)
 
 	if( range>0 && range < arange )	{// ‰“‚·‚¬‚é
 // be lenient if the skill was cast before we have moved to the correct position [Celest]
-		if (src->type == BL_PC) {
+		if (src->type == BL_PC && bl->type == BL_PC) {
 			struct map_session_data *sd;
 			nullpo_retr(0, (sd=(struct map_session_data *)bl));
 			if (sd->walktimer != -1 && !((arange-=battle_config.skill_range_leniency)<=range))