From: Bernhard Übelacker bernhardu@mailbox.org
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56186 --- dlls/dmusic/collection.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index 5cf129cfdd1..dae27fb4133 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -208,7 +208,14 @@ static HRESULT WINAPI collection_EnumInstrument(IDirectMusicCollection *iface, { if (index--) continue; *patch = entry->patch; - if (name) lstrcpynW(name, entry->desc.wszName, name_length); + if (name) + { + if (entry->desc.dwValidData & DMUS_OBJ_NAME) + lstrcpynW(name, entry->desc.wszName, name_length); + else + name[0] = L'\0'; + } + return S_OK; }