Core/Bitset: Fix infinite loop
Former-commit-id: f1246eedcd7a0b327e7e4a70803eb5cd20b071ef
This commit is contained in:
@@ -126,13 +126,10 @@ namespace Nz
|
||||
else
|
||||
{
|
||||
// Note: I was kinda tired when I wrote this, there's probably a much easier method than checking bits to write bits
|
||||
unsigned int bitPos = 0;
|
||||
for (T bit = 1; bit < std::numeric_limits<T>::max(); bit <<= 1)
|
||||
for (unsigned int bitPos = 0; bitPos < std::numeric_limits<T>::digits; bitPos++)
|
||||
{
|
||||
if (value & bit)
|
||||
if (value & (T(1U) << bitPos))
|
||||
UnboundedSet(bitPos, true);
|
||||
|
||||
bitPos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user