From bb1070b7957133f5548088f4aa9834cbaebb5e39 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 20 Jan 2012 15:48:03 +0000 Subject: [PATCH] Fix a potential wall[-1] access in Mapster32. git-svn-id: https://svn.eduke32.com/eduke32@2273 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 9e0d5821d..558dc9362 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -7752,8 +7752,7 @@ static int32_t getlinehighlight(int32_t xplc, int32_t yplc, int32_t line) } } - j = wall[closest].nextwall; - if (closest>=0 && j >= 0) + if (closest>=0 && (j = wall[closest].nextwall) >= 0) #ifdef YAX_ENABLE if (m32_sideview || ((graywallbitmap[j>>3]&(1<<(j&7)))==0)) #endif