Signal EOF when decoding comsumes all bytes to the end during a coincidental alignment. Fixes #446

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1135 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2003-08-28 03:52:19 +00:00
parent e39a5b7ca0
commit 714392f34e
@@ -415,6 +415,12 @@ uint32 SoundDecoder_Decode (TFB_SoundDecoder *decoder)
else
buffer_size = decoder->buffer_size;
if (buffer_size == 0)
{ // nothing more to decode
decoder->error = SOUNDDECODER_EOF;
return 0;
}
while (decoded_bytes < buffer_size)
{
/* Produce output in requested byte-order */