diff --git a/polymer/eduke32/source/sw/src/break.c b/polymer/eduke32/source/sw/src/break.c index 0e620a8ce..fafb75a4d 100644 --- a/polymer/eduke32/source/sw/src/break.c +++ b/polymer/eduke32/source/sw/src/break.c @@ -652,7 +652,7 @@ int AutoBreakWall(WALLp wallp, int hit_x, int hit_y, int hit_z, short ang, short else { wallp->picnum = break_info->breaknum; - if (wallp->hitag < 0) + if ((int16_t)wallp->hitag < 0) DoWallBreakSpriteMatch(wallp->hitag); } } @@ -963,7 +963,7 @@ int AutoBreakSprite(short BreakSprite, short type) break_info = FindSpriteBreakInfo(bp->picnum); - if (bp->hitag < 0) + if ((int16_t)bp->hitag < 0) DoWallBreakMatch(bp->hitag); if (!break_info) diff --git a/polymer/eduke32/source/sw/src/jnstub.c b/polymer/eduke32/source/sw/src/jnstub.c index 84db54a98..60aa37055 100644 --- a/polymer/eduke32/source/sw/src/jnstub.c +++ b/polymer/eduke32/source/sw/src/jnstub.c @@ -2291,7 +2291,7 @@ ExtGetSpriteCaption(short spritenum) // Non ST1 sprites that are tagged like them if (TEST_BOOL1(sp) && sp->picnum != ST1) { - if (SP_TAG1(sp) < 0 || SP_TAG1(sp) > 1006) + if ((uint16_t)SP_TAG1(sp) > 1006) sprintf(name, "Invalid Tag"); else sprintf(name, "%s,", StagInfo[SP_TAG1(sp)].name); // This page faults if @@ -2303,7 +2303,7 @@ ExtGetSpriteCaption(short spritenum) switch (sp->picnum) { case ST1: - if (SP_TAG1(sp) < 0 || SP_TAG1(sp) > 1006) + if ((uint16_t)SP_TAG1(sp) > 1006) sprintf(name, "Invalid Tag"); else sprintf(name, "*%s,", StagInfo[SP_TAG1(sp)].name); diff --git a/polymer/eduke32/source/sw/src/quake.c b/polymer/eduke32/source/sw/src/quake.c index f5ce0f386..324c0cb84 100644 --- a/polymer/eduke32/source/sw/src/quake.c +++ b/polymer/eduke32/source/sw/src/quake.c @@ -87,7 +87,7 @@ void DoQuakeMatch(short match) if (QUAKE_Match(sp) == match) { - if (QUAKE_WaitTics(sp) > 0) + if ((int16_t)QUAKE_WaitTics(sp) > 0) { // its not waiting any more RESET_BOOL3(sp); @@ -147,7 +147,7 @@ void ProcessQuakeSpot(void) // spawn a quake if time is up //QUAKE_WaitTics(sp) -= 4*synctics; SET_SP_TAG13(sp, (QUAKE_WaitTics(sp)-4*synctics)); - if (QUAKE_WaitTics(sp) < 0) + if ((int16_t)QUAKE_WaitTics(sp) < 0) { // reset timer - add in Duration of quake //QUAKE_WaitTics(sp) = ((QUAKE_WaitSecs(sp)*10L) + QUAKE_Duration(sp)) * 120L;