shithub: choc

Download patch

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

strife: Fix integer overflow in A_Chase

--- a/src/strife/p_enemy.c
+++ b/src/strife/p_enemy.c
@@ -1062,7 +1062,7 @@
     // 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)