Ignore:
Timestamp:
2007-04-16T04:31:52Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
b3cae44
Parents:
6bbb939
Message:

Updating the Yahoo! module. This seems to fix handling of incoming away
states/messages, should fix some issues with group chats, and unfortunately
also adds some crap which I don't want to clean up for now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo_util.c

    r6bbb939 rcfc8d58  
    6969        int i=0;
    7070        int l = strlen(sep);
    71         if(nelem < 0) {
     71        if(nelem <= 0) {
    7272                char * s;
    7373                nelem=0;
    74                 for(s=strstr(str, sep); s; s=strstr(s+l, sep),nelem++)
    75                         ;
    76                 if(strcmp(str+strlen(str)-l, sep))
    77                         nelem++;
     74                if (*str) {
     75                        for(s=strstr(str, sep); s; s=strstr(s+l, sep),nelem++)
     76                                ;
     77                        if(strcmp(str+strlen(str)-l, sep))
     78                                nelem++;
     79                }
    7880        }
    7981
     
    8789        }
    8890
    89         if(i<nelem) /* str didn't end with sep */
     91        if(i<nelem && *str) /* str didn't end with sep, and str isn't empty */
    9092                vector[i++] = strdup(p);
    9193                       
Note: See TracChangeset for help on using the changeset viewer.