decoder/modplug: check ModPlug_Read() < 0

Negative return values are not documented here, but since the function
prototype is signed, let's be sure.
This commit is contained in:
Max Kellermann 2009-11-14 22:27:04 +01:00
parent dd4625ce13
commit ff70dbd316

View File

@ -139,10 +139,8 @@ mod_decode(struct decoder *decoder, struct input_stream *is)
do {
ret = ModPlug_Read(f, audio_buffer, MODPLUG_FRAME_SIZE);
if (ret == 0) {
if (ret <= 0)
break;
}
total_time += ret * sec_perbyte;
cmd = decoder_data(decoder, NULL,