fix index out of range check in GetCoefficientAtIndex (#164)

This commit is contained in:
Daniel Zauner 2024-11-03 20:58:27 +01:00 committed by GitHub
parent d9c8b7d937
commit 5ff962be37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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}");