[Telepathy-commits] [telepathy-glib/master] Don't treat requested IDs' NULL terminator as an id.

Will Thompson will.thompson at collabora.co.uk
Wed Jan 7 07:51:13 PST 2009


Fixes fd.o bug #19101
---
 telepathy-glib/contact.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index 9e19d64..faf99ec 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -796,7 +796,8 @@ contacts_context_fail (ContactsContext *c,
           error, c->user_data, c->weak_object);
       return;
     case CB_BY_ID:
-      for (i = 0; i < c->request_ids->len; i++)
+      /* -1 because NULL terminator is explicit */
+      for (i = 0; i < c->request_ids->len - 1; i++)
         {
           const gchar *id = g_ptr_array_index (c->request_ids, i);
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list