From 9157ae2776747a1d9a597c1fe00beab1fe24719d Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 7 Oct 2018 05:20:19 +0000 Subject: [PATCH] Fix potential texcache issue with HICTINT_IN_MEMORY and HICTINT_APPLYOVERALTPAL due to a mistake involving operator precedence git-svn-id: https://svn.eduke32.com/eduke32@7002 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/texcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/build/src/texcache.cpp b/source/build/src/texcache.cpp index 17367b6e5..6fa1c9ee6 100644 --- a/source/build/src/texcache.cpp +++ b/source/build/src/texcache.cpp @@ -135,7 +135,7 @@ pthtyp *texcache_fetch(int32_t dapicnum, int32_t dapalnum, int32_t dashade, int3 polytintflags_t const tintflags = hictinting[dapalnum].f; const int32_t checktintpal = (tintflags & HICTINT_APPLYOVERALTPAL) ? 0 : si->palnum; - const int32_t checkcachepal = (tintflags & HICTINT_IN_MEMORY) || ((tintflags & HICTINT_APPLYOVERALTPAL) && si->palnum > 0) ? dapalnum : si->palnum; + const int32_t checkcachepal = ((tintflags & HICTINT_IN_MEMORY) || ((tintflags & HICTINT_APPLYOVERALTPAL) && si->palnum > 0)) ? dapalnum : si->palnum; // load a replacement for (pthtyp *pth = texcache.list[j]; pth; pth = pth->next)