Skip to content

Commit 1841af9

Browse files
committed
Don't erroneously set EOF flag if there was room to read 0 bytes
1 parent 6425e93 commit 1841af9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-module/audiomp3/MP3Decoder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
*/
5454
STATIC bool mp3file_update_inbuf_always(audiomp3_mp3file_obj_t *self) {
5555
// If we didn't previously reach the end of file, we can try reading now
56-
if (!self->eof) {
56+
if (!self->eof && self->inbuf_offset != 0) {
5757

5858
// Move the unconsumed portion of the buffer to the start
5959
uint8_t *end_of_buffer = self->inbuf + self->inbuf_length;

0 commit comments

Comments
 (0)