Fix off-by-one in fallback MSB function
This commit is contained in:
parent
c29391636a
commit
a92fa257af
@ -22,7 +22,8 @@ template <typename T> std::size_t msb(T value)
|
||||
value >>= 1u;
|
||||
msb++;
|
||||
}
|
||||
return msb;
|
||||
BOOST_ASSERT(msb > 0);
|
||||
return msb-1;
|
||||
}
|
||||
|
||||
#if (defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)) && __x86_64__
|
||||
|
Loading…
Reference in New Issue
Block a user