فهرست منبع

Corrected script command logmes (#4103)

* Fixed a potential crash with attempting to log a message with a floating NPC.
Thanks to @Akkarinage!
Aleos 6 سال پیش
والد
کامیت
c264d3e94a
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      src/map/map.cpp

+ 3 - 0
src/map/map.cpp

@@ -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