diff options
author | kwolekr <kwolekr@minetest.net> | 2015-03-31 23:30:44 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-03-31 23:30:44 -0400 |
commit | 699e066beab969156223eb3b04cc04fde091fca2 (patch) | |
tree | b5ce51c951ee2982d9cca73e4b0ab8db0ee06de8 | |
parent | 337e79c656a12bcf0dac4b25d5f0e021188e383a (diff) | |
download | minetest-699e066beab969156223eb3b04cc04fde091fca2.tar.gz minetest-699e066beab969156223eb3b04cc04fde091fca2.tar.bz2 minetest-699e066beab969156223eb3b04cc04fde091fca2.zip |
Fix set_bits
-rw-r--r-- | src/util/numeric.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |