Alistair Leslie-Hughes : dmloader: Stop after find first matching object.

Alexandre Julliard julliard at winehq.org
Fri Nov 22 16:17:26 CST 2019


Module: wine
Branch: master
Commit: 4aee9ba5ad1c7df34a06fe2bbe39ae33fd8ffcee
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4aee9ba5ad1c7df34a06fe2bbe39ae33fd8ffcee

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Fri Nov 22 08:22:35 2019 +0000

dmloader: Stop after find first matching object.

This stops a crash in Legoland on startup when finding cached objects.
Placing a break in each of the if's causes the wrong object to be loaded.

The help states it looks at each type in order. So, we might have to loop
the cache multiple times to ensure that when an object has flag DMUS_OBJ_OBJECT,
it's preferred over a DMUS_OBJ_FILENAME | DMUS_OBJ_FULLPATH match.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dmloader/loader.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c
index 0da8323e7e..69a438765d 100644
--- a/dlls/dmloader/loader.c
+++ b/dlls/dmloader/loader.c
@@ -208,6 +208,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_GetObject(IDirectMusicLoader8 *ifac
 				TRACE(": not loaded yet\n");
 				pObjectEntry = pExistingEntry;
 			}
+			break;
 		}
 		else if ((pDesc->dwValidData & (DMUS_OBJ_FILENAME | DMUS_OBJ_FULLPATH)) &&
 				(pExistingEntry->Desc.dwValidData & (DMUS_OBJ_FILENAME | DMUS_OBJ_FULLPATH)) &&




More information about the wine-cvs mailing list