summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-02-20 11:49:08 -0300
committershennetsind <ind@henn.et>2014-02-20 11:49:08 -0300
commitc080576a034acfb24f988dccdf1d474a7184cf59 (patch)
treedb2f2942d270cab7a887ab3e1dc06a44d4f66442 /src
parenta7d421274b308f7d9cc4ac39935beae851b29b97 (diff)
parent584d4aa061b648a8686e453c7019c0c7664f5ff6 (diff)
downloadhercules-c080576a034acfb24f988dccdf1d474a7184cf59.tar.gz
hercules-c080576a034acfb24f988dccdf1d474a7184cf59.tar.bz2
hercules-c080576a034acfb24f988dccdf1d474a7184cf59.tar.xz
hercules-c080576a034acfb24f988dccdf1d474a7184cf59.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 1dff4c202..1b441cabd 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7352,7 +7352,8 @@ BUILDIN(strnpcinfo) {
name = aStrdup(nd->exname);
break;
case 4: // map name
- name = aStrdup(map->list[nd->bl.m].name);
+ if( nd->bl.m >= 0 ) // Only valid map indexes allowed (issue:8034)
+ name = aStrdup(map->list[nd->bl.m].name);
break;
}