shithub: choc

Download patch

ref: 1159572a1a18c196c8450cb1fcc8712d9eacb342
parent: b42d644f8233626a60a9ae1f9fd8294d30bf3f58
author: Turo Lamminen <turol@iki.fi>
date: Sat Nov 12 12:16:12 EST 2022

hexen: Fix integer overflow in A_SerpentChase

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