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:
parent
dd4625ce13
commit
ff70dbd316
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user