shithub: choc

Download patch

ref: 21709de765d58b2ddfb69e0582e0c20147d4e774
parent: c8343e995b583eb2f93d396f7eb5380d9bb456c8
author: Turo Lamminen <turol@iki.fi>
date: Sat Nov 12 12:20:58 EST 2022

hexen: Fix integer overflow in A_FastChase

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