From 1ed1efbdfbfc414923c14132a4a6c54a7a96b40b Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 27 Jan 2011 08:58:50 +0900 Subject: [PATCH] Implement the ROTL macro correctly. Bit rotation requires unsigned ints. --- tools/qfcc/source/opcodes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qfcc/source/opcodes.c b/tools/qfcc/source/opcodes.c index 9c2ddb0f0..79ff8672d 100644 --- a/tools/qfcc/source/opcodes.c +++ b/tools/qfcc/source/opcodes.c @@ -67,7 +67,7 @@ opcode_t *op_goto; opcode_t *op_jump; opcode_t *op_jumpb; -#define ROTL(x,n) (((x)<<(n))|(x)>>(32-n)) +#define ROTL(x,n) ((((unsigned)(x))<<(n))|((unsigned)(x))>>(32-n)) static uintptr_t get_hash (void *_op, void *_tab)