Compare commits

...

1 Commits

Author SHA1 Message Date
Daniel Zauner
5ff962be37 fix index out of range check in GetCoefficientAtIndex (#164) 2024-11-03 13:58:27 -06:00

View File

@@ -81,7 +81,7 @@ namespace Ryujinx.Audio.Renderer.Dsp
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static short GetCoefficientAtIndex(ReadOnlySpan<short> coefficients, int index)
{
if ((uint)index > (uint)coefficients.Length)
if ((uint)index >= (uint)coefficients.Length)
{
Logger.Error?.Print(LogClass.AudioRenderer, $"Out of bound read for coefficient at index {index}");