]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
sanitize: shift 1u (unsigned) for flag bits
authorWolfgang Bumiller <wry.git@bumiller.com>
Tue, 14 Feb 2017 18:17:45 +0000 (19:17 +0100)
committerWolfgang Bumiller <wry.git@bumiller.com>
Tue, 14 Feb 2017 18:24:04 +0000 (19:24 +0100)
opts.cpp

index b2517a05aa3f0f06fe6cd06d8f35a139f61ece9a..c35fd73e2fb23a7752b091993dc021dfce174043 100644 (file)
--- a/opts.cpp
+++ b/opts.cpp
@@ -149,9 +149,9 @@ void opts_set(uint32_t *flags, size_t idx, bool on) {
     LONGBIT_SET(lb, idx);
 
     if (on)
-        flags[lb.idx] |= (1<<(lb.bit));
+        flags[lb.idx] |= (1u<<(lb.bit));
     else
-        flags[lb.idx] &= ~(1<<(lb.bit));
+        flags[lb.idx] &= ~(1u<<(lb.bit));
 }
 
 void opts_setoptimlevel(unsigned int level) {