dmloader: Initialize a stack variable to avoid erratic test behavior.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9b1281c021
commit
0f202ac84b
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
hr = IDirectMusicLoader_SetSearchDirectory(loader, &GUID_DirectMusicAllTypes, path, 0);
|
||||
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);
|
||||
hr = IDirectMusicLoader_SetSearchDirectory(loader, &GUID_DirectMusicAllTypes, path, 0);
|
||||
todo_wine ok(hr == S_FALSE, "Second SetSearchDirectory failed with %#x\n", hr);
|
||||
hr = IDirectMusicLoader_SetSearchDirectory(loader, &CLSID_DirectSoundWave, path, 0);
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue