diff libpurple/plugins/perl/common/AccountOpts.xs @ 24690:68a90c95b722

Tweak a few for loop conditions in the Perl bindings per Etan's suggestion. References #7687.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Thu, 11 Dec 2008 06:48:25 +0000
parents 08b65145276a
children 34b02adafd9b
line wrap: on
line diff
--- a/libpurple/plugins/perl/common/AccountOpts.xs	Thu Dec 11 06:38:23 2008 +0000
+++ b/libpurple/plugins/perl/common/AccountOpts.xs	Thu Dec 11 06:48:25 2008 +0000
@@ -44,7 +44,7 @@
 	t_GL = NULL;
 	t_len = av_len((AV *)SvRV(values)) + 1;
 
-	for (i = 0; i < t_len; i++)
+	for (i = 0; i <= t_len; i++)
 		t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(values), i, 0)));
 
 	RETVAL  = purple_account_option_list_new(text, pref_name, t_GL);
@@ -132,7 +132,7 @@
 	t_GL = NULL;
 	t_len = av_len((AV *)SvRV(values)) + 1;
 
-	for (i = 0; i < t_len; i++)
+	for (i = 0; i <= t_len; i++)
 		t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(values), i, 0)));
 
 	purple_account_option_set_list(option, t_GL);