Commit ff70dbd3 authored by Max Kellermann's avatar Max Kellermann

decoder/modplug: check ModPlug_Read() < 0

Negative return values are not documented here, but since the function prototype is signed, let's be sure.
parent dd4625ce
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment