Fixes bug https://bugs.winehq.org/show_bug.cgi?id=43660 (DOS2 classic client is affected as well)
In this specific case, the bug is caused by a call to QueryInterface inside bink2w64.dll, which then will treat a precreated XAudio27 object as XAudio28. This leads to a crash.
This fix may affect other games, that use BINK2, too.
Signed-off-by: Roger Zoellner zoellner.roger@gmail.com --- dlls/xaudio2_7/xaudio_dll.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index 28cf98565b..461ac56ffe 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -1262,7 +1262,9 @@ static HRESULT WINAPI IXAudio2Impl_QueryInterface(IXAudio2 *iface, REFIID riid, TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject);
if(IsEqualGUID(riid, &IID_IUnknown) || +#if XAUDIO2_VER == 8 IsEqualGUID(riid, &IID_IXAudio28) || +#endif IsEqualGUID(riid, &IID_IXAudio2)) *ppvObject = &This->IXAudio2_iface; else if(IsEqualGUID(riid, &IID_IXAudio27)){