correct buffer check condition

This commit is contained in:
CasualPokePlayer 2024-03-10 15:25:01 -07:00
parent 04fe0d7d04
commit 38ef6028d7
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ namespace BizHawk.Emulation.Common
/// <param name="nsamp">number of sample pairs</param>
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!");
}