Issue information

Issue ID
#2291
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Sep 29, 2008 15:46
Last Post
Hercules Elf Bot
Sep 29, 2008 15:46
Confirmation
N/A

Hercules Elf Bot - Sep 29, 2008 15:46

Originally posted by [b]Splintter[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2291

Well, i'm just looking around in npc.c

and i just look it

CODE
size_t len = p-name;
        if( len > NAME_LENGTH )
        {
            ShowWarning("npc_parsename: Display name of '%s' is too long (len=%u) in file '%s', line'%d'. Truncating to %u characters.\n", name, (unsigned int)len, filepath, strline(buffer,start-buffer), NAME_LENGTH);
            safestrncpy(nd->name, name, sizeof(nd->name));
        }


Well, NAME_LENGHT is 23 + 1, so the NPC name + null terminator correct?

Well, so i think it needs to be "if( len > NAME_LENGTH-1 )", because i can make a npc with 24 chars long and it wont display for me a warning.

Confirm or Working as Intended?