Commit 1da4b59e authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

msacm: Fix acmMetrics(ACM_METRIC_DRIVER_PRIORITY) return on error.

parent 9a577e5e
......@@ -224,12 +224,15 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
case ACM_METRIC_DRIVER_PRIORITY:
/* Return current list position of driver */
if (!hao) return MMSYSERR_INVALHANDLE;
if (!pMetric) return MMSYSERR_INVALPARAM;
mmr = MMSYSERR_INVALHANDLE;
for (i = 1, padid = MSACM_pFirstACMDriverID; padid; i++, padid = padid->pNextACMDriverID) {
if (padid == (PWINE_ACMDRIVERID)hao) {
*(LPDWORD)pMetric = i;
mmr = MMSYSERR_NOERROR;
if (pMetric) {
*(LPDWORD)pMetric = i;
mmr = MMSYSERR_NOERROR;
} else {
mmr = MMSYSERR_INVALPARAM;
}
break;
}
}
......
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