summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c5
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)