shithub: choc

Download patch

ref: 62cc2552464325ba0d865e581fb440afe9737b94
parent: c34f6ba17f2789b722eb3e3b34d9bbd873433a27
author: Turo Lamminen <turol@iki.fi>
date: Sat Nov 12 11:41:06 EST 2022

hexen: Fix integer overflow in A_Chase

--- a/src/hexen/p_enemy.c
+++ b/src/hexen/p_enemy.c
@@ -697,7 +697,7 @@
 //
     if (actor->movedir < 8)
     {
-        actor->angle &= (7 << 29);
+        actor->angle &= (7u << 29);
         delta = actor->angle - (actor->movedir << 29);
         if (delta > 0)
         {