summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/buffering.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index 588d98f30e..30601481e4 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -724,7 +724,7 @@ static void rebuffer_handle(int handle_id, size_t newpos)
queue_send(&buffering_queue, Q_RESET_HANDLE, handle_id);
size_t next = (unsigned)((void *)h->next - (void *)buffer);
- if (next - h->data < h->filesize - newpos)
+ if (RINGBUF_SUB(next, h->data) < h->filesize - newpos)
{
/* There isn't enough space to rebuffer all of the track from its new
offset, so we ask the user to free some */