diff options
author | Paradox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-26 00:22:28 +0000 |
---|---|---|
committer | Paradox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-26 00:22:28 +0000 |
commit | e51efc0c9d4fb9a66ab31e66722bf264a6596209 (patch) | |
tree | 43fc3c59fc7d653899bd9d9adc856ef4a904b9a3 /src/map/script.c | |
parent | 8f6a6d949ee9f2fdeb85d1bb9348c7abc7c12af1 (diff) | |
download | hercules-e51efc0c9d4fb9a66ab31e66722bf264a6596209.tar.gz hercules-e51efc0c9d4fb9a66ab31e66722bf264a6596209.tar.bz2 hercules-e51efc0c9d4fb9a66ab31e66722bf264a6596209.tar.xz hercules-e51efc0c9d4fb9a66ab31e66722bf264a6596209.zip |
Fixed strnpcinfo(1) returning blank strings when NPC names did not have a hidden portion of the display name. (bugreport:3758)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14170 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index fac794ba4..2a506068e 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -6118,12 +6118,13 @@ BUILDIN_FUNC(strnpcinfo) case 0: // display name name = aStrdup(nd->name); break; - case 1: // visible part of display name name + case 1: // visible part of display name if((buf = strchr(nd->name,'#')) != NULL) { name = aStrdup(nd->name); name[buf - nd->name] = 0; - } + } else // Return the name, there is no '#' present + name = aStrdup(nd->name); break; case 2: // # fragment if((buf = strchr(nd->name,'#')) != NULL) |