From 584d4aa061b648a8686e453c7019c0c7664f5ff6 Mon Sep 17 00:00:00 2001 From: panikon Date: Wed, 19 Feb 2014 22:27:18 -0300 Subject: Fixed issue 8034 http://hercules.ws/board/tracker/issue-8034-map-crash-scripts/ --- src/map/script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3-70-g09d2