foxygit / doom Log in
commit 173300a37bd820a17233645280838e4b1bfc5a79
Author:     Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Mon Jan 28 09:26:54 2019 +0100
Commit:     Fabian Greffrath <fabian@greffrath.com>
CommitDate: Mon Jan 28 09:26:54 2019 +0100

    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.
---
 src/strife/doomdef.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/strife/doomdef.h b/src/strife/doomdef.h
index 9fe179c7..cdb64541 100644
--- a/src/strife/doomdef.h
+++ b/src/strife/doomdef.h
@@ -269,7 +269,7 @@ enum
     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!
 };