summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-24 13:29:00 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-24 13:29:00 +0000
commitd1e6e862597f8bbadb055f90e31828c2ed61d01b (patch)
tree609755bc4974ae0c54c1676717fe544c9cabf8a7 /src/map
parent339ac6c105cc0548328e15adce1f94d7ecddb0bc (diff)
downloadhercules-d1e6e862597f8bbadb055f90e31828c2ed61d01b.tar.gz
hercules-d1e6e862597f8bbadb055f90e31828c2ed61d01b.tar.bz2
hercules-d1e6e862597f8bbadb055f90e31828c2ed61d01b.tar.xz
hercules-d1e6e862597f8bbadb055f90e31828c2ed61d01b.zip
* Corrected a fex misshaps from r11571:
- disabling the memory manager - using the wrong length for the title and body in mail_savemessage * Removed the quick-fix in the npc duplicate check and the impossible condition that is generating the warning. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11573 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/npc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index bbd0363e1..457711255 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1419,7 +1419,7 @@ void npc_delsrcfile(const char* name)
static void npc_parsename(struct npc_data* nd, const char* name, const char* start, const char* buffer, const char* filepath)
{
const char* p;
- struct npc_data* dnd;
+ struct npc_data* dnd;// duplicate npc
char newname[NAME_LENGTH];
// parse name
@@ -1458,16 +1458,12 @@ static void npc_parsename(struct npc_data* nd, const char* name, const char* sta
safestrncpy(nd->exname, newname, sizeof(nd->exname));
}
- if( *nd->exname == '\0' || (dnd=npc_name2id(nd->exname)) != NULL )
+ if( (dnd=npc_name2id(nd->exname)) != NULL )
{// duplicate unique name, generate new one
char this_mapname[32];
char other_mapname[32];
int i = 0;
- //TODO: the debug message is broken, if nd->exname == NULL
- //dnd is left uninitialized, and then is printed as that!
- if (*nd->exname == '\0')
- dnd = nd; //Dumb anti-crash measure since I am not sure what this piece of code is supposed to do.
do
{
++i;