Pārlūkot izejas kodu

Added a return value to buildin_rid2name if rid is invalid

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7973 54d463be-8e91-2dee-dedb-b68131a5f0ec
toms 19 gadi atpakaļ
vecāks
revīzija
b1f19b525f
2 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 1 0
      Changelog-Trunk.txt
  2. 3 0
      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.
 
 2006/07/29
+	* Added a return value to buildin_rid2name if rid is invalid [Toms]
 	* Made the SQL ping interval default to 7 hours. [Skotlex]
 	* Made skill_unitsetting remove the group when no unit-cells were placed
 	  down. basicly this means that if landprotector blocks all tiles, the group

+ 3 - 0
src/map/script.c

@@ -11674,6 +11674,9 @@ int buildin_rid2name(struct script_state *st){
 				push_str(st->stack,C_CONSTSTR,"");
 				break;
 		}
+	} else {
+		ShowError("buildin_rid2name: invalid RID\n");
+		push_str(st->stack,C_CONSTSTR,"(null)");
 	}
 	return 0;
 }