From 54373128ee896b662ec19183bbe7f92fcb9b6993 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sun, 23 Feb 2025 11:49:31 +1000 Subject: [PATCH] Fix a subtle undefined behaviour error. --- miniaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index 994cc166..33098b5a 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -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. */ for (i = 0; i < 32; i += 1) { - if ((x & (1 << i)) != 0) { + if ((x & (1U << i)) != 0) { return i; } }