From 38ef6028d73caf5e9c4325ce64444367e2addd0d Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Sun, 10 Mar 2024 15:25:01 -0700 Subject: [PATCH] correct buffer check condition --- src/BizHawk.Emulation.Common/Sound/SDLResampler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BizHawk.Emulation.Common/Sound/SDLResampler.cs b/src/BizHawk.Emulation.Common/Sound/SDLResampler.cs index 0f1a9d3a3a..2e1f23db5b 100644 --- a/src/BizHawk.Emulation.Common/Sound/SDLResampler.cs +++ b/src/BizHawk.Emulation.Common/Sound/SDLResampler.cs @@ -81,7 +81,7 @@ namespace BizHawk.Emulation.Common /// number of sample pairs public unsafe void EnqueueSamples(short[] userbuf, int nsamp) { - if (nsamp * 2 < userbuf.Length) + if (userbuf.Length < nsamp * 2) { throw new("User buffer contained less than nsamp * 2 shorts!"); }