comparison src/protocols/msn/object.c @ 9823:54377b120d19

[gaim-migrate @ 10694] This is supposed to fix an MSN thing. I think it's from SUSE. If this is wrong, then someone that knows something about MSN should probably do something about it. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 22 Aug 2004 17:31:37 +0000
parents 1e5ef71c9583
children 9d839c9f6c2d
comparison
equal deleted inserted replaced
9822:524cd6d1496e 9823:54377b120d19
33 33
34 #define GET_INT_TAG(field, id) \ 34 #define GET_INT_TAG(field, id) \
35 if ((tag = strstr(str, id "=\"")) != NULL) \ 35 if ((tag = strstr(str, id "=\"")) != NULL) \
36 { \ 36 { \
37 char buf[16]; \ 37 char buf[16]; \
38 size_t offset; \
38 tag += strlen(id "=\""); \ 39 tag += strlen(id "=\""); \
39 c = strchr(tag, '"'); \ 40 c = strchr(tag, '"'); \
40 strncpy(buf, tag, c - tag); \ 41 if (c != NULL) \
41 buf[c - tag] = '\0'; \ 42 { \
42 obj->field = atoi(buf); \ 43 memset(buf, 0, sizeof(buf)); \
44 offset = c - tag; \
45 if (offset >= sizeof(buf)) \
46 offset = sizeof(buf) - 1; \
47 strncpy(buf, tag, offset); \
48 obj->field = atoi(buf); \
49 } \
43 } 50 }
44 51
45 static GList *local_objs; 52 static GList *local_objs;
46 53
47 MsnObject * 54 MsnObject *