From 67ec26fa394c16c657b40cc0991ec8ac42f2e57b Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 31 Jul 2014 15:03:29 +0300 Subject: [PATCH] audio/avrcp: Fix not accounting all items when listing The total number of items should account that the start and end index are included so end - start index is incorrect. --- profiles/audio/avrcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index da2a7464f..29edd3363 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -2250,7 +2250,7 @@ static gboolean avrcp_list_items_rsp(struct avctp *conn, uint8_t *operands, } items = g_slist_length(p->items); - total = p->end - p->start; + total = p->end - p->start + 1; if (items < total) { avrcp_list_items(session, p->start + items + 1, p->end); return FALSE; -- 2.47.3