From 0cbb522ff039e90fe1e846dc66b840792f711b59 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 11 Feb 2018 05:03:50 +0000 Subject: [PATCH] Use an unsigned type when we need right shifts to zero-extend for use in tagbitmap. Fixes crash in boeing.map. git-svn-id: https://svn.eduke32.com/eduke32@6644 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/premap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/premap.cpp b/source/duke3d/src/premap.cpp index 62dc4a2f1..3afe33215 100644 --- a/source/duke3d/src/premap.cpp +++ b/source/duke3d/src/premap.cpp @@ -1185,7 +1185,7 @@ static void prelevel(char g) // the lower code only for the 'on' state (*) if (ii==0) { - int const tag = sprite[i].lotag; + uint16_t const tag = sprite[i].lotag; tagbitmap[tag>>3] |= 1<<(tag&7); } @@ -1197,7 +1197,7 @@ static void prelevel(char g) // initially 'on' SE 12 light (*) for (bssize_t j=headspritestat[STAT_EFFECTOR]; j>=0; j=nextspritestat[j]) { - int const tag = sprite[j].hitag; + uint16_t const tag = sprite[j].hitag; if (sprite[j].lotag == SE_12_LIGHT_SWITCH && tagbitmap[tag>>3]&(1<<(tag&7))) actor[j].t_data[0] = 1;