Mercurial > pidgin.yaz
changeset 5928:395c7f769e05
[gaim-migrate @ 6368]
This makes comparing two screen names work correctly with two names
that should be the same, but one of them begins with a space.
Whoops.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 20 Jun 2003 04:46:33 +0000 |
parents | 04dc7fe68889 |
children | b85e88d3fa5f |
files | src/protocols/oscar/util.c |
diffstat | 1 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/util.c Fri Jun 20 04:16:23 2003 +0000 +++ b/src/protocols/oscar/util.c Fri Jun 20 04:46:33 2003 +0000 @@ -197,16 +197,14 @@ faim_export int aim_sncmp(const char *sn1, const char *sn2) { - while (toupper(*sn1) == toupper(*sn2)) { - if (*sn1 == '\0') - return 0; - sn1++; - sn2++; + do { while (*sn2 == ' ') sn2++; while (*sn1 == ' ') sn1++; - } + if (toupper(*sn1) != toupper(*sn2)) + return 1; + } while ((*sn1 != '\0') && sn1++ && sn2++); - return 1; + return 0; }