From 51241f66ad6e78cf56b91c41e524c00a1d5abeb2 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 21 Sep 2013 03:47:19 +0200 Subject: Fixed a potentially negative array subscript causing a mapserver crash - Fixes bugreport:7717, special thanks to quesoph http://hercules.ws/board/tracker/issue-7717-map-crash-when-warping-on-a-floating-npc/ - Also changed various map[foo].index to the map_id2index(foo) macro. Signed-off-by: Haru --- src/map/instance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/instance.c') diff --git a/src/map/instance.c b/src/map/instance.c index 98a0dfc8f..cb5464b24 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -377,7 +377,7 @@ void instance_del_map(int16 m) { if( map[m].mob_delete_timer != INVALID_TIMER ) iTimer->delete_timer(map[m].mob_delete_timer, iMap->removemobs_timer); - mapindex_removemap( map[m].index ); + mapindex_removemap(map_id2index(m)); // Free memory aFree(map[m].cell); -- cgit v1.2.3-60-g2f50