mirror of
https://github.com/videolan/vlc.git
synced 2024-11-23 01:43:35 +08:00
stdbit: fix CTZ fall-back
The computed value was incorrect for types smaller than long long. The code is not really used by anything at the moment, since we pretty much compile with Clang or GCC only.
This commit is contained in:
parent
bea0af00e8
commit
dbc3f839d8
@ -178,6 +178,8 @@ static inline unsigned int __stdc_trailing_zeros(unsigned long long value,
|
||||
{
|
||||
unsigned int zeros = size * CHAR_BIT;
|
||||
|
||||
values <<= (sizeof (value) * CHAR_BIT) - zeros;
|
||||
|
||||
while (value != 0) {
|
||||
value <<= 1;
|
||||
zeros--;
|
||||
|
Loading…
Reference in New Issue
Block a user