From 744697c4fe213821c18dd882098b311550d42da7 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Fri, 8 May 2015 08:57:20 +0200 Subject: warnings: fix "iteration XY invokes undefined behavior" warnings These were caused by loops which caused overflow of variables of type angle_t (= unsigned) by multiplication with iterators of typed int in angle calculations. Changing the type of the iterator variables to "unsigned int" prevents the undefined behavior. --- src/hexen/p_enemy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hexen') diff --git a/src/hexen/p_enemy.c b/src/hexen/p_enemy.c index dc2c9fe5..38f3a2b5 100644 --- a/src/hexen/p_enemy.c +++ b/src/hexen/p_enemy.c @@ -3855,7 +3855,7 @@ void A_IceGuyDie(mobj_t * actor) void A_IceGuyMissileExplode(mobj_t * actor) { mobj_t *mo; - int i; + unsigned int i; for (i = 0; i < 8; i++) { -- cgit v1.2.3