From 307321ec20befe32cd254497f62b6ab0dcbcaf83 Mon Sep 17 00:00:00 2001 From: Thomas Fach-Pedersen Date: Sat, 22 Oct 2016 20:24:57 +0200 Subject: BLADERUNNER: Fix invalid assert in AudStream --- engines/bladerunner/aud_stream.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/bladerunner/aud_stream.cpp b/engines/bladerunner/aud_stream.cpp index 1ff54e05f1..e859b3347e 100644 --- a/engines/bladerunner/aud_stream.cpp +++ b/engines/bladerunner/aud_stream.cpp @@ -75,7 +75,14 @@ int AudStream::readBuffer(int16 *buffer, const int numSamples) { assert(sig == 0xdeaf); assert(_end - _p >= blockSize); - assert(blockOutSize == 4 * blockSize); + + // TODO: Previously we asserted that + // blockOutSize == 4 * blockSize, but + // occasionally, at the end of an AUD, + // we see blockOutSize == 4 * blockSize + 2 + // Investigate how BLADE.EXE handles this. + + assert(blockOutSize / 4 == blockSize); _deafBlockRemain = blockSize; } -- cgit v1.2.3