Commit f3c36e49 authored by David Reid's avatar David Reid

Fix a bounds check in ma_get_backend_name().

parent 596f23c1
...@@ -17665,7 +17665,7 @@ static ma_backend_info gBackendInfo[] = /* Indexed by the backend enum. Must be ...@@ -17665,7 +17665,7 @@ static ma_backend_info gBackendInfo[] = /* Indexed by the backend enum. Must be
MA_API const char* ma_get_backend_name(ma_backend backend) MA_API const char* ma_get_backend_name(ma_backend backend)
{ {
if (backend >= ma_countof(gBackendInfo)) { if (backend < 0 || backend >= ma_countof(gBackendInfo)) {
return "Unknown"; return "Unknown";
} }
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