Commit 54373128 authored by David Reid's avatar David Reid

Fix a subtle undefined behaviour error.

parent c74c90f6
...@@ -13932,7 +13932,7 @@ static ma_uint32 ma_ffs_32(ma_uint32 x) ...@@ -13932,7 +13932,7 @@ static ma_uint32 ma_ffs_32(ma_uint32 x)
/* Just a naive implementation just to get things working for now. Will optimize this later. */ /* Just a naive implementation just to get things working for now. Will optimize this later. */
for (i = 0; i < 32; i += 1) { for (i = 0; i < 32; i += 1) {
if ((x & (1 << i)) != 0) { if ((x & (1U << i)) != 0) {
return i; return i;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment