diff options
Diffstat (limited to 'src/map/homunculus.c')
-rw-r--r-- | src/map/homunculus.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 081287d8a..c94a95775 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/malloc.h" @@ -709,7 +710,7 @@ int merc_hom_change_name_ack(struct map_session_data *sd, char* name, int flag) clif_displaymessage(sd->fd, msg_txt(280)); // You cannot use this name return 0; } - strncpy(hd->homunculus.name,name,NAME_LENGTH); + safestrncpy(hd->homunculus.name,name,NAME_LENGTH); clif_charnameack (0,&hd->bl); hd->homunculus.rename_flag = 1; clif_hominfo(sd,hd,0); @@ -887,7 +888,7 @@ int merc_create_homunculus_request(struct map_session_data *sd, int class_) memset(&homun, 0, sizeof(struct s_homunculus)); //Initial data - strncpy(homun.name, homunculus_db[i].name, NAME_LENGTH-1); + safestrncpy(homun.name, homunculus_db[i].name, NAME_LENGTH-1); homun.class_ = class_; homun.level = 1; homun.hunger = 32; //32% @@ -1050,7 +1051,7 @@ static bool read_homunculusdb_sub(char* str[], int columns, int current) } db->evo_class = classid; //Name, Food, Hungry Delay, Base Size, Evo Size, Race, Element, ASPD - strncpy(db->name,str[2],NAME_LENGTH-1); + safestrncpy(db->name,str[2],NAME_LENGTH-1); db->foodID = atoi(str[3]); db->hungryDelay = atoi(str[4]); db->base_size = atoi(str[5]); |