Author: janderwald
Date: Mon Apr 25 20:34:41 2011
New Revision: 51455
URL:
http://svn.reactos.org/svn/reactos?rev=51455&view=rev
Log:
[MMIXER]
- Merge 50674 to trunk:
- Allocate memory for the logical pin array
- Use the correct counter variable for logical pin array
- Found by msvc
See issue #6143 for more details.
Modified:
trunk/reactos/lib/drivers/sound/mmixer/sup.c
Modified: trunk/reactos/lib/drivers/sound/mmixer/sup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmixer/s…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mmixer/sup.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mmixer/sup.c [iso-8859-1] Mon Apr 25 20:34:41 2011
@@ -544,6 +544,14 @@
ASSERT(MixerData->Topology);
ASSERT(MixerData->MixerInfo == MixerInfo);
+ /* now allocate logical pin array */
+ Status = MMixerAllocateTopologyNodeArray(MixerContext,
MixerData->Topology, &LogicalNodes);
+ if (Status != MM_STATUS_SUCCESS)
+ {
+ /* no memory */
+ return MM_STATUS_NO_MEMORY;
+ }
+
/* get logical pin nodes */
MMixerGetConnectedFromLogicalTopologyPins(MixerData->Topology,
MixerControl->NodeID, &LogicalNodesCount, LogicalNodes);
@@ -552,7 +560,7 @@
ASSERT(LogicalNodesCount == MixerControl->Control.Metrics.dwReserved[0]);
Values = (LPMIXERCONTROLDETAILS_BOOLEAN)MixerControlDetails->paDetails;
- for(Index = 0; Index < ConnectedNodesCount; Index++)
+ for(Index = 0; Index < LogicalNodesCount; Index++)
{
/* getting logical pin offset */
MMixerGetLowestLogicalTopologyPinOffsetFromArray(LogicalNodesCount,
LogicalNodes, &CurLogicalPinOffset);