mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-28 01:17:11 +02:00
amadeus: Fix possible device sink input out of bound (#3032)
This fix an out of bound when indexing inputs for games that uses unsupported values (8 here) Close #2724.
This commit is contained in:
parent
3f325544d4
commit
94cf56ff88
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
|
||||||
InputCount = sink.Parameter.InputCount;
|
InputCount = sink.Parameter.InputCount;
|
||||||
InputBufferIndices = new ushort[InputCount];
|
InputBufferIndices = new ushort[InputCount];
|
||||||
|
|
||||||
for (int i = 0; i < InputCount; i++)
|
for (int i = 0; i < Math.Min(InputCount, Constants.ChannelCountMax); i++)
|
||||||
{
|
{
|
||||||
InputBufferIndices[i] = (ushort)(bufferOffset + sink.Parameter.Input[i]);
|
InputBufferIndices[i] = (ushort)(bufferOffset + sink.Parameter.Input[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue