Mercurial > pidgin
changeset 6790:1aea5e6186bd
[gaim-migrate @ 7329]
I dun lernt my math
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 08 Sep 2003 01:47:58 +0000 |
parents | 94b575afb77e |
children | 9927df765fae |
files | src/protocols/msn/msnobject.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/msn/msnobject.c Sun Sep 07 23:58:43 2003 +0000 +++ b/src/protocols/msn/msnobject.c Mon Sep 08 01:47:58 2003 +0000 @@ -26,7 +26,7 @@ { \ tag += strlen(id "=\""); \ c = strchr(tag, '"'); \ - obj->field = g_strndup(tag, tag - c); \ + obj->field = g_strndup(tag, c - tag); \ } #define GET_INT_TAG(field, id) \ @@ -35,7 +35,7 @@ char buf[16]; \ tag += strlen(id "=\""); \ c = strchr(tag, '"'); \ - strncpy(buf, tag, tag - c); \ + strncpy(buf, tag, c - tag); \ obj->field = atoi(buf); \ } @@ -63,8 +63,6 @@ obj = msn_object_new(); - g_return_val_if_fail(str != NULL, NULL); - GET_STRING_TAG(creator, "Creator"); GET_INT_TAG(size, "Size"); GET_INT_TAG(type, "Type");