diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 4 | ||||
-rw-r--r-- | src/map/npc.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index c59c2b851..e638d6513 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -4730,12 +4730,12 @@ int atcommand_loadnpc(const int fd, struct map_session_data* sd, const char* com int atcommand_unloadnpc(const int fd, struct map_session_data* sd, const char* command, const char* message) { struct npc_data *nd; - char NPCname[NAME_LENGTH]; + char NPCname[NAME_LENGTH+1]; nullpo_retr(-1, sd); memset(NPCname, '\0', sizeof(NPCname)); - if (!message || !*message || sscanf(message, "%23[^\n]", NPCname) < 1) { + if (!message || !*message || sscanf(message, "%24[^\n]", NPCname) < 1) { clif_displaymessage(fd, "Please, enter a NPC name (usage: @npcoff <NPC_name>)."); return -1; } diff --git a/src/map/npc.h b/src/map/npc.h index 9aae58d3c..dcb112966 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -31,8 +31,8 @@ struct npc_data { struct npc_data *master_nd; short class_; short speed; - char name[NAME_LENGTH];// display name - char exname[NAME_LENGTH];// unique npc name + char name[NAME_LENGTH+1];// display name + char exname[NAME_LENGTH+1];// unique npc name int chat_id; unsigned int next_walktime; |