diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-10-12 08:57:02 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-10-12 08:57:02 +0000 |
commit | fd073c4aaccf50ec3ae9a9025aea26edf984df12 (patch) | |
tree | 67299f7d233c265ead0cf7c92189ac4baa41b077 /src | |
parent | 14cc24833227aef53e6e55495715c56c3fd3fc4b (diff) | |
download | hercules-fd073c4aaccf50ec3ae9a9025aea26edf984df12.tar.gz hercules-fd073c4aaccf50ec3ae9a9025aea26edf984df12.tar.bz2 hercules-fd073c4aaccf50ec3ae9a9025aea26edf984df12.tar.xz hercules-fd073c4aaccf50ec3ae9a9025aea26edf984df12.zip |
Partially revert r14085, NPC names are allowed to be more than 24 character long in Aegis.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14087 54d463be-8e91-2dee-dedb-b68131a5f0ec
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; |