소스 검색

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