mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed negative case in GetHighestBitSet
This commit is contained in:
parent
3454e26941
commit
cbe398b548
1 changed files with 1 additions and 1 deletions
|
@ -1009,7 +1009,7 @@ int32 Beefy::Rand()
|
|||
int32 Beefy::GetHighestBitSet(int32 n)
|
||||
{
|
||||
int i = 0;
|
||||
for (; n; n >>= 1, i++)
|
||||
for (; n; n = (int)((uint32)n >> 1), i++)
|
||||
; /* empty */
|
||||
return i;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue