Mercurial > pidgin
changeset 22285:5411ca13b878
merge of '8d0a8e8a3f64465f6fe98c9344417e6f5f60cace'
and 'd7ac6b99ef7882ae0af3758b0267dc2a47020712'
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Mon, 11 Feb 2008 00:50:42 +0000 |
parents | 9559469acd62 (current diff) 2222a596340f (diff) |
children | 9cce91512be1 36036b9489fe 5aabf4e24188 |
files | |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c Mon Feb 11 00:50:26 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.c Mon Feb 11 00:50:42 2008 +0000 @@ -6609,18 +6609,18 @@ g_return_val_if_fail(str != NULL, NULL); - strncpy(buf, str, BUF_LEN); - for (i=0, j=0; buf[j]; i++, j++) + /* copy str to buf and skip all blanks */ + for (i=0, j=0; str[j] && i < BUF_LEN; i++, j++) { - while (buf[j] == ' ') + while (str[j] == ' ') j++; - buf[i] = buf[j]; + buf[i] = str[j]; } buf[i] = '\0'; tmp1 = g_utf8_strdown(buf, -1); tmp2 = g_utf8_normalize(tmp1, -1, G_NORMALIZE_DEFAULT); - g_snprintf(buf, sizeof(buf), "%s", tmp2); + strcpy(buf, tmp2); g_free(tmp2); g_free(tmp1);