Kaynağa Gözat

Fix a bug in atcommand_charspeed

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8100 54d463be-8e91-2dee-dedb-b68131a5f0ec
toms 19 yıl önce
ebeveyn
işleme
b34ef7be7c
2 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  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/08/03
+	* Fix a bug in atcommand_charspeed [Toms]
 	* Fixed a logic error preventing from cooking anything [DracoRPG]
 	* Cleaned up the last NJ update code. [Skotlex]
 	* Added @ command `charspeed` [Skotlex]

+ 1 - 1
src/map/atcommand.c

@@ -2154,7 +2154,7 @@ int atcommand_charspeed(
 	memset(atcmd_output, '\0', sizeof(atcmd_output));
 	memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
 
-	if (!message || !*message || sscanf(message, "%d %23[^\n]", speed, atcmd_player_name) < 2) {
+	if (!message || !*message || sscanf(message, "%d %23[^\n]", &speed, atcmd_player_name) < 2) {
 		sprintf(atcmd_output, "Please, enter a speed and a player name (usage: @charspeed <speed <%d-%d>> <char name>).", MIN_WALK_SPEED, MAX_WALK_SPEED);
 		clif_displaymessage(fd, atcmd_output);
 		return -1;