Update of /cvsroot/gaim/gaim/src/protocols/oscar
In directory usw-pr-cvs1:/tmp/cvs-serv16189/protocols/oscar
Modified Files:
oscar.c
Log Message:
it's going to be a lot harder to insert backd^H^H^H^H^Heaster eggs with everyone watching me.
Index: oscar.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- oscar.c 2001/09/24 21:41:19 1.39
+++ oscar.c 2001/09/26 19:19:19 1.40
@@ -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;
|