From: Wolfgang Bumiller Date: Tue, 14 Feb 2017 18:17:45 +0000 (+0100) Subject: sanitize: shift 1u (unsigned) for flag bits X-Git-Tag: xonotic-v0.8.5~40 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8b2149e315d9cc7383a86e894e41dc2bf9728d93;p=xonotic%2Fgmqcc.git sanitize: shift 1u (unsigned) for flag bits --- diff --git a/opts.cpp b/opts.cpp index b2517a0..c35fd73 100644 --- 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) {