Przeglądaj źródła

Changed a few sprintf's that had no format arguments to strcpy's.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13887 54d463be-8e91-2dee-dedb-b68131a5f0ec
Paradox924X 16 lat temu
rodzic
commit
f93f3b1e33
3 zmienionych plików z 6 dodań i 6 usunięć
  1. 1 1
      src/map/atcommand.c
  2. 3 3
      src/map/mob.c
  3. 2 2
      src/map/trade.c

+ 1 - 1
src/map/atcommand.c

@@ -2713,7 +2713,7 @@ int atcommand_produce(const int fd, struct map_session_data* sd, const char* com
 	if ((item_data = itemdb_searchname(item_name)) == NULL &&
 	    (item_data = itemdb_exists(atoi(item_name))) == NULL)
 	{
-		sprintf(atcmd_output, msg_txt(170)); // The item is not equipable.
+		strcpy(atcmd_output, msg_txt(170)); // The item is not equipable.
 		clif_displaymessage(fd, atcmd_output);
 		return -1;
 	}

+ 3 - 3
src/map/mob.c

@@ -3128,9 +3128,9 @@ int mob_clone_spawn(struct map_session_data *sd, int m, int x, int y, const char
 
 	db = mob_db_data[class_]=(struct mob_db*)aCalloc(1, sizeof(struct mob_db));
 	status = &db->status;
-	sprintf(db->sprite,sd->status.name);
-	sprintf(db->name,sd->status.name);
-	sprintf(db->jname,sd->status.name);
+	strcpy(db->sprite,sd->status.name);
+	strcpy(db->name,sd->status.name);
+	strcpy(db->jname,sd->status.name);
 	db->lv=status_get_lv(&sd->bl);
 	memcpy(status, &sd->base_status, sizeof(struct status_data));
 	status->rhw.atk2= status->dex + status->rhw.atk + status->rhw.atk2; //Max ATK

+ 2 - 2
src/map/trade.c

@@ -203,7 +203,7 @@ int impossible_trade_check(struct map_session_data *sd)
 				chrif_char_ask_name(-1, sd->status.name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block
 				set_eof(sd->fd); // forced to disconnect because of the hack
 				// message about the ban
-				sprintf(message_to_gm, msg_txt(540)); //  This player has been definitivly blocked.
+				strcpy(message_to_gm, msg_txt(540)); //  This player has been definitively blocked.
 			// if we ban people
 			} else if (battle_config.ban_hack_trade > 0) {
 				chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, 0, battle_config.ban_hack_trade, 0); // type: 2 - ban (year, month, day, hour, minute, second)
@@ -212,7 +212,7 @@ int impossible_trade_check(struct map_session_data *sd)
 				sprintf(message_to_gm, msg_txt(507), battle_config.ban_hack_trade); //  This player has been banned for %d minute(s).
 			} else
 				// message about the ban
-				sprintf(message_to_gm, msg_txt(508)); //  This player hasn't been banned (Ban option is disabled).
+				strcpy(message_to_gm, msg_txt(508)); //  This player hasn't been banned (Ban option is disabled).
 			
 			intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message_to_gm);
 			return 1;