commit 8fc4e10f01a7c216163a9b607435afb44959aa8a
Author: Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Mon Jan 28 10:00:38 2019 +0100
Commit: Fabian Greffrath <fabian@greffrath.com>
CommitDate: Mon Jan 28 10:00:38 2019 +0100
heretic: replace shifted negative value with negative of shifted value
This fixes a "Shifting a negative value is undefined behaviour"
cppcheck error.
---
src/heretic/r_things.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/heretic/r_things.c b/src/heretic/r_things.c
index c598034e..6cdd67c0 100644
--- a/src/heretic/r_things.c
+++ b/src/heretic/r_things.c
@@ -1006,7 +1006,7 @@ void R_DrawMasked(void)
//
// Added for the sideviewing with an external device
if (viewangleoffset <= 1024 << ANGLETOFINESHIFT || viewangleoffset >=
- -1024 << ANGLETOFINESHIFT)
+ -(1024 << ANGLETOFINESHIFT))
{ // don't draw on side views
R_DrawPlayerSprites();
}