Pārlūkot izejas kodu

The Clearing unused stack report will now print the related NPC

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8584 54d463be-8e91-2dee-dedb-b68131a5f0ec
toms 18 gadi atpakaļ
vecāks
revīzija
9c8acc1464
2 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  1. 1 0
      Changelog-Trunk.txt
  2. 5 2
      src/map/script.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ 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.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/09/01
 2006/09/01
+	* The Clearing unused stack report will now print the related NPC [Toms]
 	* The duplicate npc report will now print the related file name [Toms]
 	* The duplicate npc report will now print the related file name [Toms]
 	* Added config setting "partial_name_scan", which specifies whether @ given
 	* Added config setting "partial_name_scan", which specifies whether @ given
 	  names should use a partial string lookup or absolute name lookup. Defaults
 	  names should use a partial string lookup or absolute name lookup. Defaults

+ 5 - 2
src/map/script.c

@@ -2630,8 +2630,11 @@ void run_script_main(struct script_state *st)
 				if(stack->sp > stack->defsp)
 				if(stack->sp > stack->defsp)
 				{	//sp > defsp is valid in cases when you invoke functions and don't use the returned value. [Skotlex]
 				{	//sp > defsp is valid in cases when you invoke functions and don't use the returned value. [Skotlex]
 					//Since sp is supposed to be defsp in these cases, we could assume the extra stack elements are unneeded.
 					//Since sp is supposed to be defsp in these cases, we could assume the extra stack elements are unneeded.
-					if (battle_config.etc_log)
-						ShowWarning("Clearing unused stack stack.sp(%d) -> default(%d)\n",stack->sp,stack->defsp);
+					if (battle_config.etc_log)
+					{
+						ShowWarning("Clearing unused stack stack.sp(%d) -> default(%d)\n",stack->sp,stack->defsp);
+						report_src(st);
+					}
 					pop_stack(stack, stack->defsp, stack->sp); //Clear out the unused stack-section.
 					pop_stack(stack, stack->defsp, stack->sp); //Clear out the unused stack-section.
 				} else if(battle_config.error_log)
 				} else if(battle_config.error_log)
 					ShowError("stack.sp(%d) != default(%d)\n",stack->sp,stack->defsp);
 					ShowError("stack.sp(%d) != default(%d)\n",stack->sp,stack->defsp);