summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-03-28 16:34:47 -0400
committergumi <git@gumi.ca>2018-03-28 16:39:02 -0400
commit584e8de359412091cb05f98b83a25fac47b5c9f2 (patch)
tree3f817e5b5dcdf4bf65b25a7c79f4a6cfc2245ece
parent38527550c17241e1c905f8077f6589413091087e (diff)
downloadhercules-584e8de359412091cb05f98b83a25fac47b5c9f2.tar.gz
hercules-584e8de359412091cb05f98b83a25fac47b5c9f2.tar.bz2
hercules-584e8de359412091cb05f98b83a25fac47b5c9f2.tar.xz
hercules-584e8de359412091cb05f98b83a25fac47b5c9f2.zip
don't throw a warning in buildin_getmapinfo when the map is not found
-rw-r--r--src/map/script.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index d653800cc..45bf076fb 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -12815,12 +12815,12 @@ enum mapinfo_info {
BUILDIN(getmapinfo)
{
enum mapinfo_info mode = script_getnum(st, 2);
- int16 m;
+ int16 m = -1;
if (script_hasdata(st, 3)) {
if (script_isstringtype(st, 3)) {
const char *str = script_getstr(st, 3);
- m = map->mapname2mapid(str);
+ m = map->mapindex2mapid(strdb_iget(mapindex->db, str));
} else {
m = script_getnum(st, 3);
}