diff -r 517beaba545d -r baa7cbe5775a libpurple/protocols/myspace/myspace.c --- a/libpurple/protocols/myspace/myspace.c Fri May 08 03:54:58 2009 +0000 +++ b/libpurple/protocols/myspace/myspace.c Sun May 10 22:06:08 2009 +0000 @@ -847,8 +847,6 @@ MsimMessage *body; guint old_inbox_status; guint i, n; - const gchar *froms[5], *tos[5], *urls[5], *subjects[5]; - /* Information for each new inbox message type. */ static struct { @@ -863,16 +861,22 @@ { "FriendRequest", MSIM_INBOX_FRIEND_REQUEST, "http://messaging.myspace.com/index.cfm?fuseaction=mail.friendRequests", NULL }, { "PictureComment", MSIM_INBOX_PICTURE_COMMENT, "http://home.myspace.com/index.cfm?fuseaction=user", NULL } }; + const gchar *froms[ARRAY_LENGTH(message_types) + 1] = { "" }, + *tos[ARRAY_LENGTH(message_types) + 1] = { "" }, + *urls[ARRAY_LENGTH(message_types) + 1] = { "" }, + *subjects[ARRAY_LENGTH(message_types) + 1] = { "" }; + + g_return_if_fail(reply != NULL); /* Can't write _()'d strings in array initializers. Workaround. */ + /* khc: then use N_() in the array initializer and use _() when they are + used */ message_types[0].text = _("New mail messages"); message_types[1].text = _("New blog comments"); message_types[2].text = _("New profile comments"); message_types[3].text = _("New friend requests!"); message_types[4].text = _("New picture comments"); - g_return_if_fail(reply != NULL); - body = msim_msg_get_dictionary(reply, "body"); if (body == NULL)