Mercurial > pidgin.yaz
changeset 2361:554b001d7d98
[gaim-migrate @ 2374]
it's going to be a lot harder to insert backd^H^H^H^H^Heaster eggs with everyone watching me.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 26 Sep 2001 19:19:19 +0000 |
parents | 8a304d8c5ce3 |
children | ba6d3f0467cb |
files | src/protocols/oscar/oscar.c |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Wed Sep 26 01:43:41 2001 +0000 +++ b/src/protocols/oscar/oscar.c Wed Sep 26 19:19:19 2001 +0000 @@ -149,15 +149,14 @@ tmp = g_strdup(++x); for (i = 0, j = 0; x[i]; i++) { - if (x[i] != '%') + char hex[3]; + if (x[i] != '%') { tmp[j++] = x[i]; - else { - char hex[3]; - hex[0] = x[++i]; - hex[1] = x[++i]; - hex[2] = 0; - sscanf(hex, "%x", (int *)&tmp[j++]); + continue; } + strncpy(hex, x + ++i, 2); hex[2] = 0; + i++; + tmp[j++] = strtol(hex, NULL, 16); } tmp[j] = 0;