From b33eb2ea4f12668709b7fb39aebad4e0b4c79f02 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sun, 15 Feb 2026 08:05:02 +1000 Subject: [PATCH] Win32: Fix a bug in `ma_dlopen()` with the UWP build. Public issue https://github.com/mackron/miniaudio/pull/1095 --- CHANGES.md | 3 ++- miniaudio.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 274dbd2e..f87a9f39 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ v0.11.25 - TBD ===================== -* Fixed warnings with the Emscripten build. +* Fixed warnings with the Emscripten build relating to the renaming of of `__EMSCRIPTEN_major/minor/tiny__` macros. +* Win32: Fixed an error with runtime linking on the UWP build. This is actually a non issue in practice because it would require miniaudio to pass in a DLL name of longer than 2048 characters which it never does. v0.11.24 - 2026-01-17 diff --git a/miniaudio.h b/miniaudio.h index 49c91479..b028c2e9 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -19358,7 +19358,7 @@ MA_API ma_handle ma_dlopen(ma_log* pLog, const char* filename) #else /* *sigh* It appears there is no ANSI version of LoadPackagedLibrary()... */ WCHAR filenameW[4096]; - if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, sizeof(filenameW)) == 0) { + if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, ma_countof(filenameW)) == 0) { handle = NULL; } else { handle = (ma_handle)LoadPackagedLibrary(filenameW, 0);