# HG changeset patch # User Mark Doliner # Date 1056084393 0 # Node ID 395c7f769e057e7f995eec375c595851719ab45a # Parent 04dc7fe68889735a31ed85313e66c46089e25bf5 [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 diff -r 04dc7fe68889 -r 395c7f769e05 src/protocols/oscar/util.c --- 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; }