summaryrefslogtreecommitdiff
path: root/src/heretic/p_enemy.c
diff options
context:
space:
mode:
authorFabian Greffrath2015-05-08 08:57:20 +0200
committerFabian Greffrath2015-05-08 08:57:20 +0200
commit744697c4fe213821c18dd882098b311550d42da7 (patch)
tree6cb2f3e9a4a2b338412b97a03d20e01ae4d1f2d9 /src/heretic/p_enemy.c
parent2e8f6da6fdf0eb71e58d2cdaad24e5b0a332f675 (diff)
downloadchocolate-doom-744697c4fe213821c18dd882098b311550d42da7.tar.gz
chocolate-doom-744697c4fe213821c18dd882098b311550d42da7.tar.bz2
chocolate-doom-744697c4fe213821c18dd882098b311550d42da7.zip
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.
Diffstat (limited to 'src/heretic/p_enemy.c')
-rw-r--r--src/heretic/p_enemy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/heretic/p_enemy.c b/src/heretic/p_enemy.c
index b4222ec8..55608c54 100644
--- a/src/heretic/p_enemy.c
+++ b/src/heretic/p_enemy.c
@@ -1904,7 +1904,7 @@ void A_WhirlwindSeek(mobj_t * actor)
void A_HeadIceImpact(mobj_t * ice)
{
- int i;
+ unsigned int i;
angle_t angle;
mobj_t *shard;
@@ -2519,7 +2519,7 @@ void A_VolcanoBlast(mobj_t * volcano)
void A_VolcBallImpact(mobj_t * ball)
{
- int i;
+ unsigned int i;
mobj_t *tiny;
angle_t angle;