libpurple/plugins/perl/common/Conversation.xs

changeset 25106
2d9389f32256
parent 23983
586866581434
child 25107
bd102c539600
child 25112
4e9dba9e28e6
--- a/libpurple/plugins/perl/common/Conversation.xs	Thu Dec 11 06:32:05 2008 +0000
+++ b/libpurple/plugins/perl/common/Conversation.xs	Thu Dec 11 06:38:23 2008 +0000
@@ -334,7 +334,7 @@
 	int i, t_len;
 PPCODE:
 	t_GL = NULL;
-	t_len = av_len((AV *)SvRV(users));
+	t_len = av_len((AV *)SvRV(users)) + 1;
 
 	for (i = 0; i < t_len; i++)
 		t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(users), i, 0)));
@@ -372,7 +372,7 @@
 	int i, t_len;
 PPCODE:
 	t_GL = NULL;
-	t_len = av_len((AV *)SvRV(ignored));
+	t_len = av_len((AV *)SvRV(ignored)) + 1;
 
 	for (i = 0; i < t_len; i++)
 		t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(ignored), i, 0)));
@@ -429,19 +429,19 @@
 	int i, t_len;
 PPCODE:
 	t_GL_users = NULL;
-	t_len = av_len((AV *)SvRV(users));
+	t_len = av_len((AV *)SvRV(users)) + 1;
 
 	for (i = 0; i < t_len; i++)
 		t_GL_users = g_list_append(t_GL_users, SvPVutf8_nolen(*av_fetch((AV *)SvRV(users), i, 0)));
 
 	t_GL_flags = NULL;
-	t_len = av_len((AV *)SvRV(flags));
+	t_len = av_len((AV *)SvRV(flags)) + 1;
 
 	for (i = 0; i < t_len; i++)
 		t_GL_flags = g_list_append(t_GL_flags, SvPVutf8_nolen(*av_fetch((AV *)SvRV(flags), i, 0)));
 
 	t_GL_extra_msgs = NULL;
-	t_len = av_len((AV *)SvRV(extra_msgs));
+	t_len = av_len((AV *)SvRV(extra_msgs)) + 1;
 
 	for (i = 0; i < t_len; i++)
 		t_GL_extra_msgs = g_list_append(t_GL_extra_msgs, SvPVutf8_nolen(*av_fetch((AV *)SvRV(extra_msgs), i, 0)));

mercurial