From 49b28c16a8820b3390eaead854dd8628ca53ea78 Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Sun, 17 Dec 2023 12:36:51 +0100 Subject: [PATCH] adjust assert --- src/util/bootSound/BootSoundReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/bootSound/BootSoundReader.cpp b/src/util/bootSound/BootSoundReader.cpp index b2fb0654..6709269a 100644 --- a/src/util/bootSound/BootSoundReader.cpp +++ b/src/util/bootSound/BootSoundReader.cpp @@ -8,7 +8,7 @@ BootSoundReader::BootSoundReader(FSCVirtualFile* bootsndFile, sint32 blockSize) fsc_readFile(bootsndFile, &loopPoint, 4); buffer.resize(blockSize / sizeof(sint16)); bufferBE.resize(blockSize / sizeof(sint16be)); - if(blockSize % sizeof(sint16be) != 0) + if(blockSize % (sizeof(sint16be) * 2) != 0) cemu_assert_suspicious(); } @@ -18,7 +18,7 @@ sint16* BootSoundReader::getSamples() while(totalRead < blockSize) { auto read = fsc_readFile(bootsndFile, bufferBE.data(), blockSize - totalRead); - if (read % sizeof(sint16be) != 0) + if (read % (sizeof(sint16be) * 2) != 0) cemu_assert_suspicious(); std::copy_n(bufferBE.begin(), read / sizeof(sint16be), buffer.begin() + (totalRead / sizeof(sint16)));