# HG changeset patch # User Eric Warmenhoven # Date 1001531959 0 # Node ID 554b001d7d98c9eafb6f895d73532ea6b56d75fe # Parent 8a304d8c5ce350f1d32fed8bd956e144bd2b3e78 [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 diff -r 8a304d8c5ce3 -r 554b001d7d98 src/protocols/oscar/oscar.c --- 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;