From 26fab96849ed8deabda03fe4e5be6b9db433ed42 Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Tue, 8 Jun 2010 17:22:45 -0300 Subject: [PATCH] obexd: Fix off-by-one error when dealing with offsets During a PullPhonebook there was a off-by-one error, which was causing more entries than asked for to be exported. --- obexd/plugins/phonebook-tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obexd/plugins/phonebook-tracker.c b/obexd/plugins/phonebook-tracker.c index 46d18350c..e64a3f2b7 100644 --- a/obexd/plugins/phonebook-tracker.c +++ b/obexd/plugins/phonebook-tracker.c @@ -503,7 +503,7 @@ static void pull_contacts(char **reply, int num_fields, void *user_data) last_index = params->liststartoffset + params->maxlistcount; - if (data->index < params->liststartoffset || data->index > last_index) + if (data->index <= params->liststartoffset || data->index > last_index) return; add_entry: -- 2.47.3