--- a/pidgin/plugins/perl/common/GtkIMHtml.xs Thu Dec 11 06:32:05 2008 +0000 +++ b/pidgin/plugins/perl/common/GtkIMHtml.xs Thu Dec 11 06:38:23 2008 +0000 @@ -171,7 +171,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(unused)); + t_len = av_len((AV *)SvRV(unused)) + 1; for (i = 0; i < t_len; i++) { STRLEN t_sl;