Fix off-by-one for "needs to lead" code.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sat, 5 Mar 2005 01:09:11 +0000 (01:09 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sat, 5 Mar 2005 01:09:11 +0000 (01:09 +0000)
bigscreen/groupscreen.cpp

index cdd2633..2c49020 100644 (file)
@@ -527,7 +527,7 @@ void GroupScreen::draw_next_up_player(unsigned char *buf, const Group &group, co
                if (player.total + max_score_this_song > lead_beat && (lead_beat != win_beat)) {
                        int lead_need = std::max(lead_beat - player.total + 1, 0U);
 
-                       if (lead_need > 0) {
+                       if (lead_need > 1) {
                                text = widestring("Needs to lead: ") + widestring(pqxx::to_string(lead_need));
                                this_width = my_draw_text(text, NULL, 18.0);
                                my_draw_text(text, buf, 18.0, (LOGICAL_SCREEN_WIDTH/2) - this_width/2, y);