shithub: choc

Download patch

ref: c34f6ba17f2789b722eb3e3b34d9bbd873433a27
parent: b1b6b060d4acddde9b01bbe51c70955c011883d3
author: Turo Lamminen <[email protected]>
date: Sat Nov 12 11:39:40 EST 2022

heretic: Fix integer overflow in A_Chase

--- a/src/heretic/p_enemy.c
+++ b/src/heretic/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)
         {