From b85b4d7b7c511263d077511cda53d1fac01a3377 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 9 Dec 2011 19:10:51 +0000 Subject: [PATCH] polymer.c: fix out-of-bounds picanm[] read. git-svn-id: https://svn.eduke32.com/eduke32@2167 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index 10eaea6ef..f3523edfe 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -2747,7 +2747,7 @@ static void polymer_updatewall(int16_t wallnum) wallpicnum = wal->picnum; if (picanm[wallpicnum]&192) wallpicnum += animateoffs(wallpicnum,wallnum+16384); walloverpicnum = wal->overpicnum; - if (picanm[walloverpicnum]&192) walloverpicnum += animateoffs(walloverpicnum,wallnum+16384); + if (walloverpicnum>=0 && picanm[walloverpicnum]&192) walloverpicnum += animateoffs(walloverpicnum,wallnum+16384); if (nwallnum >= 0 && nwallnum < numwalls) { nwallpicnum = wall[nwallnum].picnum;