shithub: choc

Download patch

ref: 173300a37bd820a17233645280838e4b1bfc5a79
parent: 6478a56726884d731039d1a38ff376ee955e1783
author: Fabian Greffrath <fabian@greffrath.com>
date: Mon Jan 28 04:26:54 EST 2019

strife: explicitly declare a bit-shifted 1 literal as unsigned

This fixes a future "Shifting signed 32-bit value by 31 bits is
undefined behaviour" cppcheck error.

--- a/src/strife/doomdef.h
+++ b/src/strife/doomdef.h
@@ -269,7 +269,7 @@
     QF_QUEST29 = (1 << tk_quest29), // Destroyed the Mines Transmitter
     QF_QUEST30 = (1 << tk_quest30),
     QF_QUEST31 = (1 << tk_quest31),
-    QF_QUEST32 = (1 << tk_quest32), // Unused; BUG: Broken Coupling accidentally sets it.
+    QF_QUEST32 = (1U << tk_quest32), // Unused; BUG: Broken Coupling accidentally sets it.
     
     QF_ALLQUESTS  = (QF_QUEST31 + (QF_QUEST31 - 1)) // does not include bit 32!
 };