ChangeLog: fixed mciSendString debug reporting when an error occurs (spotted by Erland Lewin) A+
Index: dlls/winmm/mci.c =================================================================== RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/mci.c,v retrieving revision 1.36 diff -u -r1.36 mci.c --- dlls/winmm/mci.c 25 Oct 2002 19:00:12 -0000 1.36 +++ dlls/winmm/mci.c 25 Oct 2002 19:29:01 -0000 @@ -799,11 +799,11 @@ /************************************************************************** * MCI_HandleReturnValues [internal] */ -static DWORD MCI_HandleReturnValues(DWORD dwRet, LPWINE_MCIDRIVER wmd, LPCSTR lpCmd, +static DWORD MCI_HandleReturnValues(DWORD dwRet, LPWINE_MCIDRIVER wmd, DWORD retType, LPDWORD data, LPSTR lpstrRet, UINT uRetLen) { if (lpstrRet) { - switch (MCI_GetReturnType(lpCmd)) { + switch (retType) { case 0: /* nothing to return */ break; case MCI_INTEGER: @@ -875,6 +875,7 @@ DWORD dwFlags = 0, dwRet = 0; int offset = 0; DWORD data[MCI_DATA_SIZE]; + DWORD retType; LPCSTR lpCmd = 0; LPSTR devAlias = NULL; BOOL bAutoOpen = FALSE; @@ -1005,7 +1006,7 @@ } /* set return information */ - switch (MCI_GetReturnType(lpCmd)) { + switch (retType = MCI_GetReturnType(lpCmd)) { case 0: offset = 1; break; case MCI_INTEGER: offset = 2; break; case MCI_STRING: data[1] = (DWORD)lpstrRet; data[2] = uRetLen; offset = 3; break; @@ -1043,7 +1044,7 @@ dwRet = MCI_SendCommand(wmd->wDeviceID, MCI_GetMessage(lpCmd), dwFlags, (DWORD)data, TRUE); } TRACE("=> 1/ %lx (%s)\n", dwRet, lpstrRet); - dwRet = MCI_HandleReturnValues(dwRet, wmd, lpCmd, data, lpstrRet, uRetLen); + dwRet = MCI_HandleReturnValues(dwRet, wmd, retType, data, lpstrRet, uRetLen); TRACE("=> 2/ %lx (%s)\n", dwRet, lpstrRet); errCleanUp: