From 92a699b7eb303f310f688a6adae5341613008f5f Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Tue, 26 Nov 2019 08:24:06 +0000 Subject: [PATCH] SW: Fix enough OOBs to get in-game git-svn-id: https://svn.eduke32.com/eduke32@8295 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/sw/src/_functio.h # source/sw/src/config.cpp # source/sw/src/sector.cpp --- source/sw/src/sector.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/sw/src/sector.cpp b/source/sw/src/sector.cpp index 0f0e5a5a8..c8535df7f 100644 --- a/source/sw/src/sector.cpp +++ b/source/sw/src/sector.cpp @@ -197,8 +197,9 @@ WallSetup(void) wall_num = wall[wall_num].point2) { SET(wall[wall_num].extra, WALLFX_LOOP_DONT_SPIN); - if (wall[wall_num].nextwall >= 0) - SET(wall[wall[wall_num].nextwall].extra, WALLFX_LOOP_DONT_SPIN); + auto const nextwall = wall[wall_num].nextwall; + if ((unsigned)nextwall < MAXSECTORS) + SET(wall[nextwall].extra, WALLFX_LOOP_DONT_SPIN); } break;