foxygit / doom Log in
commit 4a0ee9813b29a11059e8044bd00d64588fc027d7
Author:     Turo Lamminen <turol@iki.fi>
AuthorDate: Sat Nov 12 16:41:41 2022 +0200
Commit:     Turo Lamminen <turol@iki.fi>
CommitDate: Sat Nov 12 16:42:32 2022 +0200

    strife: Fix integer overflow in A_Chase
---
 src/strife/p_enemy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/strife/p_enemy.c b/src/strife/p_enemy.c
index 3fe97494..2f44d2ec 100644
--- a/src/strife/p_enemy.c
+++ b/src/strife/p_enemy.c
@@ -1062,7 +1062,7 @@ void A_Chase (mobj_t*	actor)
     // turn towards movement direction if not there yet
     if (actor->movedir < 8)
     {
-        actor->angle &= (7<<29);
+        actor->angle &= (7u << 29);
         delta = actor->angle - (actor->movedir << 29);

         if (delta > 0)