From 6a39d505492fd2b6aae97ac25ac876fe15ee83ce Mon Sep 17 00:00:00 2001 From: Inkfish Date: Sun, 11 Oct 2009 04:55:57 +0000 Subject: NPC should only have a 24 characters long name including EOS. (bugreport:3599) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14085 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 1 + src/map/npc.h | 4 ++-- src/map/script.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index a08480277..e4d4beddc 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 09/10/10 * Added character rename function. [Inkfish] + * NPCs' names should only be 24 characters long including EOS. [Inkfish] 09/10/06 * Fixed rental items can be moved into guild storage from cart. [Inkfish] 09/10/04 diff --git a/src/map/npc.h b/src/map/npc.h index dcb112966..9aae58d3c 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+1];// display name - char exname[NAME_LENGTH+1];// unique npc name + char name[NAME_LENGTH];// display name + char exname[NAME_LENGTH];// unique npc name int chat_id; unsigned int next_walktime; diff --git a/src/map/script.c b/src/map/script.c index 745a6888b..0d781906c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -13940,7 +13940,7 @@ BUILDIN_FUNC(instance_npcname) if( instance_id && (nd = npc_name2id(str)) != NULL ) { - static char npcname[NAME_LENGTH+1]; + static char npcname[NAME_LENGTH]; snprintf(npcname, sizeof(npcname), "dup_%d_%d", instance_id, nd->bl.id); script_pushconststr(st,npcname); } -- cgit v1.2.3-70-g09d2