Michael Stefaniuc : dmloader: Initialize a stack variable to avoid erratic test behavior.
Alexandre Julliard
julliard at winehq.org
Wed Jul 19 16:05:32 CDT 2017
Module: wine
Branch: master
Commit: 0f202ac84b562980e454bbafe700a7f4e2af5097
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0f202ac84b562980e454bbafe700a7f4e2af5097
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Wed Jul 19 02:24:03 2017 +0200
dmloader: Initialize a stack variable to avoid erratic test behavior.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 41418b8..aa5dfed 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 6b2ee3a..1735994 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);
More information about the wine-cvs
mailing list