From 699e066beab969156223eb3b04cc04fde091fca2 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Tue, 31 Mar 2015 23:30:44 -0400 Subject: Fix set_bits --- src/util/numeric.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/util/numeric.h b/src/util/numeric.h index 74c1dfea6..a158a2eae 100644 --- a/src/util/numeric.h +++ b/src/util/numeric.h @@ -258,7 +258,7 @@ inline u32 get_bits(u32 x, u32 pos, u32 len) inline void set_bits(u32 *x, u32 pos, u32 len, u32 val) { u32 mask = (1 << len) - 1; - *x &= ~(mask << len); + *x &= ~(mask << pos); *x |= (val & mask) << pos; } -- cgit v1.2.3