From 0f202ac84b562980e454bbafe700a7f4e2af5097 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 19 Jul 2017 02:24:03 +0200 Subject: [PATCH] dmloader: Initialize a stack variable to avoid erratic test behavior. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- dlls/dmloader/loader.c | 1 + dlls/dmloader/tests/loader.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c index 41418b8d3ea..aa5dfed74b3 100644 --- a/dlls/dmloader/loader.c +++ b/dlls/dmloader/loader.c @@ -529,6 +529,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_SetSearchDirectory(IDirectMusicLoad if (clear) FIXME("clear flag ignored\n"); + current_path[0] = 0; DMUSIC_GetLoaderSettings(iface, class, current_path, NULL); if (!strncmpW(current_path, path, MAX_PATH)) return S_FALSE; diff --git a/dlls/dmloader/tests/loader.c b/dlls/dmloader/tests/loader.c index 6b2ee3ad931..17359940887 100644 --- a/dlls/dmloader/tests/loader.c +++ b/dlls/dmloader/tests/loader.c @@ -66,11 +66,11 @@ static void test_directory(void) /* Two consecutive SetSearchDirectory with the same path */ GetTempPathW(ARRAY_SIZE(path), path); hr = IDirectMusicLoader_SetSearchDirectory(loader, &GUID_DirectMusicAllTypes, path, 0); - todo_wine ok(hr == S_OK, "SetSearchDirectory failed with %#x\n", hr); + ok(hr == S_OK, "SetSearchDirectory failed with %#x\n", hr); hr = IDirectMusicLoader_SetSearchDirectory(loader, &GUID_DirectMusicAllTypes, path, 0); - ok(hr == S_FALSE, "Second SetSearchDirectory failed with %#x\n", hr); + todo_wine ok(hr == S_FALSE, "Second SetSearchDirectory failed with %#x\n", hr); hr = IDirectMusicLoader_SetSearchDirectory(loader, &CLSID_DirectSoundWave, path, 0); - ok(hr == S_OK, "SetSearchDirectory failed with %#x\n", hr); + todo_wine ok(hr == S_OK, "SetSearchDirectory failed with %#x\n", hr); hr = IDirectMusicLoader_SetSearchDirectory(loader, &CLSID_DirectSoundWave, path, 0); ok(hr == S_FALSE, "Second SetSearchDirectory failed with %#x\n", hr); -- 2.11.4.GIT