aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceManagerGeneric.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-07-31 22:22:11 -0300
committerGitHub <noreply@github.com>2024-07-31 22:22:11 -0300
commitd97e995e5943aaddd8de88837b2dbfdf4d1616f4 (patch)
treea71a71743ae794fd6ed5df0e2a351c1150ffdc2f /src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceManagerGeneric.cs
parent56b2f847022a52ad57f41278dfec7d44e606a625 (diff)
Fix off-by-one on audio renderer PerformanceManager.GetNextEntry (#7139)1.1.1364
Diffstat (limited to 'src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceManagerGeneric.cs')
-rw-r--r--src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceManagerGeneric.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceManagerGeneric.cs b/src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceManagerGeneric.cs
index 5a70a1bc..2e5d25b9 100644
--- a/src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceManagerGeneric.cs
+++ b/src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceManagerGeneric.cs
@@ -234,7 +234,7 @@ namespace Ryujinx.Audio.Renderer.Server.Performance
{
performanceEntry = null;
- if (_entryDetailIndex > MaxFrameDetailCount)
+ if (_entryDetailIndex >= MaxFrameDetailCount)
{
return false;
}
@@ -245,7 +245,7 @@ namespace Ryujinx.Audio.Renderer.Server.Performance
EntryCountOffset = (uint)CurrentHeader.GetEntryCountOffset(),
};
- uint baseEntryOffset = (uint)(Unsafe.SizeOf<THeader>() + GetEntriesSize() + Unsafe.SizeOf<IPerformanceDetailEntry>() * _entryDetailIndex);
+ uint baseEntryOffset = (uint)(Unsafe.SizeOf<THeader>() + GetEntriesSize() + Unsafe.SizeOf<TEntryDetail>() * _entryDetailIndex);
ref TEntryDetail entryDetail = ref EntriesDetail[_entryDetailIndex];