diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-11-08 18:27:19 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-11-08 18:27:19 +0000 |
commit | b50473ffd8c0a693d6cd2247afa2e12b1cdec675 (patch) | |
tree | e5120a111fa955a52f514525dd34aec4a54d13b6 /apps/buffering.c | |
parent | 941600f121c002c5bfdbbdf0b35e9ee509a701af (diff) |
Fix a bug introduced by r15533 where end-of-file wouldn't be detected correctly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15541 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/buffering.c')
-rw-r--r-- | apps/buffering.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/buffering.c b/apps/buffering.c index e55e81da45..0a26673696 100644 --- a/apps/buffering.c +++ b/apps/buffering.c @@ -984,8 +984,11 @@ static struct memory_handle *prep_bufdata(int handle_id, size_t *size, size_t avail = RINGBUF_SUB(h->widx, h->ridx); if (avail == 0 && h->filerem == 0) + { /* File is finished reading */ - return 0; + *size = 0; + return h; + } if (*size == 0 || *size > avail + h->filerem) *size = avail + h->filerem; |