Commit 17cff085 authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

Avoid trap in mixerGetLineControlsA when cControls is uninitialized

and MIXER_GETLINECONTROLSSF_ONEBYTYPE requested.
parent 1a7a4fbe
......@@ -488,7 +488,15 @@ UINT WINAPI mixerGetLineControlsA(HMIXEROBJ hmix, LPMIXERLINECONTROLSA lpmlcA,
mlcW.dwLineID = lpmlcA->dwLineID;
mlcW.u.dwControlID = lpmlcA->u.dwControlID;
mlcW.u.dwControlType = lpmlcA->u.dwControlType;
/* Debugging on Windows shows for MIXER_GETLINECONTROLSF_ONEBYTYPE only,
the control count is assumed to be 1 - This is relied upon by a game,
"Dynomite Deluze" */
if (MIXER_GETLINECONTROLSF_ONEBYTYPE == fdwControls) {
mlcW.cControls = 1;
} else {
mlcW.cControls = lpmlcA->cControls;
}
mlcW.cbmxctrl = sizeof(MIXERCONTROLW);
mlcW.pamxctrl = HeapAlloc(GetProcessHeap(), 0,
mlcW.cControls * mlcW.cbmxctrl);
......
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