Skip to content

Commit

Permalink
fix index out of range check in GetCoefficientAtIndex (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daninator1 authored Nov 3, 2024
1 parent d9c8b7d commit 5ff962b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ryujinx.Audio/Renderer/Dsp/AdpcmHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private static short Saturate(int value)
[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}");

Expand Down

0 comments on commit 5ff962b

Please sign in to comment.