Commit ee4d9c5e authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Return an error if dwSize is not valid.

No need to dump dwFlags before it is initialized.
parent 6ae2a1f1
...@@ -401,15 +401,12 @@ static HRESULT WINAPI IDirectSoundImpl_DuplicateSoundBuffer( ...@@ -401,15 +401,12 @@ static HRESULT WINAPI IDirectSoundImpl_DuplicateSoundBuffer(
static HRESULT WINAPI IDirectSoundImpl_GetCaps(LPDIRECTSOUND8 iface,LPDSCAPS caps) { static HRESULT WINAPI IDirectSoundImpl_GetCaps(LPDIRECTSOUND8 iface,LPDSCAPS caps) {
ICOM_THIS(IDirectSoundImpl,iface); ICOM_THIS(IDirectSoundImpl,iface);
TRACE("(%p,%p)\n",This,caps); TRACE("(%p,%p)\n",This,caps);
TRACE("(flags=0x%08lx)\n",caps->dwFlags);
if (caps == NULL) if (caps == NULL || caps->dwSize!=sizeof(*caps))
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
/* We should check this value, not set it. See Inside DirectX, p215. */
caps->dwSize = sizeof(*caps);
caps->dwFlags = This->drvcaps.dwFlags; caps->dwFlags = This->drvcaps.dwFlags;
TRACE("(flags=0x%08lx)\n",caps->dwFlags);
/* FIXME: copy caps from This->drvcaps */ /* FIXME: copy caps from This->drvcaps */
caps->dwMinSecondarySampleRate = DSBFREQUENCY_MIN; caps->dwMinSecondarySampleRate = DSBFREQUENCY_MIN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment