Просмотр исходного кода

- Small change in @commands, may fix the null-pointer error.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6318 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 лет назад
Родитель
Сommit
6082535bca
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/atcommand.c

+ 1 - 0
Changelog-Trunk.txt

@@ -3,6 +3,7 @@ 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/04/27
+	* Small change in @commands, may fix the null-pointer error. [Skotlex]
 	* Changebase script command will also refresh the weapon sprites (in case
 	  you changed into Wedding/Xmas class) [Skotlex]
 	* Small change in the pet_ai that should stop the "strange" catch-up

+ 1 - 1
src/map/atcommand.c

@@ -1173,7 +1173,7 @@ int atcommand_commands(const int fd, struct map_session_data* sd,
 	clif_displaymessage(fd, msg_txt(273));
 	memset(atcmd_output, 0, sizeof atcmd_output);
 	for (i = 0; atcommand_info[i].type != AtCommand_None; i++)
-		if (atcommand_info[i].level <= level) {
+		if (atcommand_info[i].level <= level && atcommand_info[i].command) {
 			count++;
 			strcat(atcmd_output, atcommand_info[i].command);
 			strcat(atcmd_output, " ");