diff options
-rw-r--r-- | docs/CREDITS | 1 | ||||
-rw-r--r-- | firmware/id3.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/docs/CREDITS b/docs/CREDITS index 798fce35ce..4086f1bc9d 100644 --- a/docs/CREDITS +++ b/docs/CREDITS @@ -285,3 +285,4 @@ Simon Descarpentries Douglas Valentine Jacob Gardner Pascal Briehl +Denis Stanishevskiy diff --git a/firmware/id3.c b/firmware/id3.c index 92327ed92b..11ae683ee3 100644 --- a/firmware/id3.c +++ b/firmware/id3.c @@ -308,7 +308,7 @@ static int read_unsynched(int fd, void *buf, int len) while(remaining) { rp = wp; rc = read(fd, rp, remaining); - if(rc < 0) + if(rc <= 0) return rc; i = unsynchronize(wp, remaining, &global_ff_found); @@ -329,7 +329,7 @@ static int skip_unsynched(int fd, int len) while(remaining) { rlen = MIN(sizeof(buf), (unsigned int)remaining); rc = read(fd, buf, rlen); - if(rc < 0) + if(rc <= 0) return rc; remaining -= unsynchronize(buf, rlen, &global_ff_found); |