From: Steinar H. Gunderson Date: Sat, 5 Mar 2005 01:09:11 +0000 (+0000) Subject: Fix off-by-one for "needs to lead" code. X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=e51cb41cb5a8aeef4f11088d71229766de2b4a92 Fix off-by-one for "needs to lead" code. --- diff --git a/bigscreen/groupscreen.cpp b/bigscreen/groupscreen.cpp index cdd2633..2c49020 100644 --- a/bigscreen/groupscreen.cpp +++ b/bigscreen/groupscreen.cpp @@ -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);