Corrected script command logmes (#4103)

* Fixed a potential crash with attempting to log a message with a floating NPC.
Thanks to @Akkarinage!
This commit is contained in:
Aleos 2019-04-18 14:28:49 -04:00 committed by GitHub
parent a3bd4c3964
commit c264d3e94a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2976,6 +2976,9 @@ void map_removemobs(int16 m)
*------------------------------------------*/
const char* map_mapid2mapname(int m)
{
if (m == -1)
return "Floating";
struct map_data *mapdata = map_getmapdata(m);
if (mapdata->instance_id) { // Instance map check