Fixed bitfieldInsert and bitfieldExtract

This commit is contained in:
Christophe Riccio
2014-11-12 22:48:15 +01:00
parent debe75a6e1
commit 062ee19ac7
4 changed files with 23 additions and 18 deletions

View File

@@ -44,7 +44,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER int mask(int Bits)
{
return ~((~0) << Bits);
return Bits >= 32 ? 0xffffffff : (static_cast<int>(1) << Bits) - static_cast<int>(1);
}
}//namespace detail