Commit 86061862 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

winmm: Save data that was not yet written in mmioSetInfo.

parent 193663e8
......@@ -949,25 +949,23 @@ MMRESULT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO* lpmmioinfo, UINT uFlags)
*/
MMRESULT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO* lpmmioinfo, UINT uFlags)
{
LPWINE_MMIO wm;
LPWINE_MMIO wm;
TRACE("(%p,%p,0x%08x)\n",hmmio,lpmmioinfo,uFlags);
if ((wm = MMIO_Get(hmmio)) == NULL)
return MMSYSERR_INVALHANDLE;
return MMSYSERR_INVALHANDLE;
/* check pointers coherence */
if (lpmmioinfo->pchNext < wm->info.pchBuffer ||
lpmmioinfo->pchNext > wm->info.pchBuffer + wm->info.cchBuffer ||
lpmmioinfo->pchEndRead < wm->info.pchBuffer ||
lpmmioinfo->pchEndRead > wm->info.pchBuffer + wm->info.cchBuffer ||
lpmmioinfo->pchEndWrite < wm->info.pchBuffer ||
lpmmioinfo->pchEndWrite > wm->info.pchBuffer + wm->info.cchBuffer)
return MMSYSERR_INVALPARAM;
wm->info.pchNext = lpmmioinfo->pchNext;
wm->info.pchEndRead = lpmmioinfo->pchEndRead;
lpmmioinfo->pchNext > wm->info.pchBuffer + wm->info.cchBuffer ||
lpmmioinfo->pchEndRead < wm->info.pchBuffer ||
lpmmioinfo->pchEndRead > wm->info.pchBuffer + wm->info.cchBuffer ||
lpmmioinfo->pchEndWrite < wm->info.pchBuffer ||
lpmmioinfo->pchEndWrite > wm->info.pchBuffer + wm->info.cchBuffer)
return MMSYSERR_INVALPARAM;
wm->info = *lpmmioinfo;
return MMSYSERR_NOERROR;
}
......
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