liquid_feedback_core
changeset 367:f690ef9147f7
Bugfix in "lf_update_suggestion_order": Set candidate_count to zero, also in cases where no tuples are returned
author | jbe |
---|---|
date | Sun Mar 17 15:33:27 2013 +0100 (2013-03-17) |
parents | 59598477298c |
children | 18289b64def1 |
files | lf_update_suggestion_order.c |
line diff
1.1 --- a/lf_update_suggestion_order.c Sun Mar 17 15:26:30 2013 +0100 1.2 +++ b/lf_update_suggestion_order.c Sun Mar 17 15:33:27 2013 +0100 1.3 @@ -231,6 +231,7 @@ 1.4 char *old_member_id = NULL; 1.5 struct ballot *ballot; 1.6 int candidates_in_sections[4] = {0, }; 1.7 + candidate_count = 0; 1.8 tuple_count = PQntuples(res); 1.9 if (!tuple_count) { 1.10 if (final) { 1.11 @@ -243,7 +244,6 @@ 1.12 return 0; 1.13 } 1.14 } 1.15 - candidate_count = 0; 1.16 for (i=0; i<tuple_count; i++) { 1.17 char *member_id, *suggestion_id; 1.18 member_id = PQgetvalue(res, i, COL_MEMBER_ID);