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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user