liquid_feedback_core

changeset 373:88322e31107b

Fixed bug in while loop of "loser" function of lf_update_suggestion_order.c, that has been introduced in last commit
author jbe
date Sun Mar 17 20:06:30 2013 +0100 (2013-03-17)
parents 5f3cd73f328d
children fadfe4f267e2
files lf_update_suggestion_order.c
line diff
     1.1 --- a/lf_update_suggestion_order.c	Sun Mar 17 20:03:01 2013 +0100
     1.2 +++ b/lf_update_suggestion_order.c	Sun Mar 17 20:06:30 2013 +0100
     1.3 @@ -101,8 +101,8 @@
     1.4    }
     1.5    // calculate remaining candidates to be seated:
     1.6    remaining = candidate_count - round_number;
     1.7 -  // repeat following loop, if there is more than one remaining candidate:
     1.8 -  if (remaining > 1) while (1) {
     1.9 +  // repeat following loop, as long as there is more than one remaining candidate:
    1.10 +  while (remaining > 1) {
    1.11      double scale;  // factor to be later multiplied with score_per_step:
    1.12      // reset score_per_step for all candidates:
    1.13      for (i=0; i<candidate_count; i++) {
    1.14 @@ -155,7 +155,7 @@
    1.15            candidates[i].score += scale * candidates[i].score_per_step;
    1.16            if (candidates[i].score >= 1.0) remaining--;
    1.17          }
    1.18 -        // when there is only one candidate remaining, then break loop:
    1.19 +        // when there is only one candidate remaining, then break inner (and thus outer) loop:
    1.20          if (remaining <= 1) break;
    1.21        }
    1.22      }

Impressum / About Us