From 0f6e22e20e9888e1af9ba0925e623aca85c407db Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 20 Dec 2013 18:31:24 +0000 Subject: [PATCH] sector.c: in ST9 handling code, prevent oob for improperly constructed doors. git-svn-id: https://svn.eduke32.com/eduke32@4203 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/sector.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index 40c29daf2..ae35c4956 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -569,6 +569,9 @@ void G_OperateSectors(int32_t sn, int32_t ii) else wallfind[1] = i; } + if (wallfind[1] == -1) + return; + for (j=0; j<2; j++) { if ((wall[wallfind[j]].x == dax) && (wall[wallfind[j]].y == day))