From 5388520198829fcaed438746b9ecb776ef0c4b40 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 10 Nov 2013 18:07:19 +0000 Subject: [PATCH] Fix array understep in automap --- similar/main/automap.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/similar/main/automap.cpp b/similar/main/automap.cpp index 798f1782b..6501ec887 100644 --- a/similar/main/automap.cpp +++ b/similar/main/automap.cpp @@ -1274,8 +1274,7 @@ static void add_segment_edges(automap *am, segment *seg) #if defined(DXX_BUILD_DESCENT_II) int trigger_num = Walls[seg->sides[sn].wall_num].trigger; - int ttype = Triggers[trigger_num].type; - if (ttype==TT_SECRET_EXIT) + if (trigger_num != -1 && Triggers[trigger_num].type==TT_SECRET_EXIT) { color = BM_XRGB( 29, 0, 31 ); no_fade=1;