Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- dlls/winmm/mmio.c | 7 +++++++ dlls/winmm/tests/mmio.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c index 7882dc1c2f9..db210a29bec 100644 --- a/dlls/winmm/mmio.c +++ b/dlls/winmm/mmio.c @@ -755,6 +755,13 @@ HMMIO WINAPI mmioOpenW(LPWSTR szFileName, MMIOINFO* lpmmioinfo,
ret = MMIO_Open(szFn, lpmmioinfo, dwOpenFlags, TRUE);
+ if (szFileName) + { + INT len = MultiByteToWideChar( CP_ACP, 0, szFn, -1, NULL, 0 ); + if (len < 128) len = 128; + MultiByteToWideChar( CP_ACP, 0, szFn, -1, szFileName, len ); + } + HeapFree(GetProcessHeap(), 0, szFn); return ret; } diff --git a/dlls/winmm/tests/mmio.c b/dlls/winmm/tests/mmio.c index ae9d4b6aeeb..47788510910 100644 --- a/dlls/winmm/tests/mmio.c +++ b/dlls/winmm/tests/mmio.c @@ -559,7 +559,7 @@ static void test_mmioOpen_create(void) ok(hmmio == (HMMIO)TRUE, "failed to parse file name, error %#x\n", info.wErrorRet); wcscpy(expect, temp_dir); wcscat(expect, L"test_mmio_path"); - todo_wine ok(!wcscmp(buffer, expect), "expected %s, got %s\n", debugstr_w(expect), debugstr_w(buffer)); + ok(!wcscmp(buffer, expect), "expected %s, got %s\n", debugstr_w(expect), debugstr_w(buffer));
wcscpy(buffer, L"test_mmio_path"); info.wErrorRet = 0xdead;