# HG changeset patch # User Eric Warmenhoven # Date 996625244 0 # Node ID 83d8a9b7e89bc67ad36204ab484d8fc7005db61b # Parent 59b0377d18aa2cfdc5e0f59130f138378e77cea5 [gaim-migrate @ 2103] ben winslow's url_decode fix committer: Tailor Script diff -r 59b0377d18aa -r 83d8a9b7e89b src/protocols/msn/msn.c --- a/src/protocols/msn/msn.c Wed Aug 01 00:10:16 2001 +0000 +++ b/src/protocols/msn/msn.c Wed Aug 01 00:20:44 2001 +0000 @@ -101,9 +101,11 @@ buf[j++] = msg[i]; continue; } - g_snprintf(hex, sizeof(hex), "%s", msg + ++i); - i++; - sscanf(hex, "%%x", (unsigned int *)&buf[j++]); + strncpy(hex, msg + ++i, 2); hex[2] = 0; + /* i is pointing to the start of the number */ + i++; /* now it's at the end and at the start of the for loop + will be at the next character */ + buf[j++] = strtol(hex, NULL, 16); } buf[j] = 0;