diff libpurple/protocols/jabber/presence.c @ 17564:ac1ee71efd89

Small fix for caps
author Andreas Monitzer <pidgin@monitzer.com>
date Wed, 06 Jun 2007 01:23:18 +0000
parents 95affacf6f82
children 0370da969e8a
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c	Wed Jun 06 01:19:49 2007 +0000
+++ b/libpurple/protocols/jabber/presence.c	Wed Jun 06 01:23:18 2007 +0000
@@ -182,7 +182,7 @@
         /* add the extensions */
         char extlist[1024];
         unsigned remaining = 1023; /* one less for the \0 */
-        GSList *feature;
+        GList *feature;
         
         extlist[0] = '\0';
         for(feature = js->features; feature && remaining > 0; feature = feature->next) {
@@ -195,8 +195,10 @@
             
             strncat(extlist,feat->shortname,remaining);
             remaining -= featlen;
-            strncat(extlist," ",remaining);
-            --remaining;
+            if(feature->next) { /* no space at the end */
+                strncat(extlist," ",remaining);
+                --remaining;
+            }
         }
         /* did we add anything? */
         if(remaining < 1023)