X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Fgroupscreen.cpp;h=7e45628851225e48da81b472d789fb6d098ecfe9;hp=441117d45e29f95e58056748ab2add1635b5a93e;hb=bc35fe826101ca7eb29a6fa2e06eba2cd6c99222;hpb=a8f2be0a433f5f0ddaa1f1e26512e2a39c552989 diff --git a/bigscreen/groupscreen.cpp b/bigscreen/groupscreen.cpp index 441117d..7e45628 100644 --- a/bigscreen/groupscreen.cpp +++ b/bigscreen/groupscreen.cpp @@ -121,19 +121,17 @@ void GroupScreen::draw(unsigned char *buf) unsigned col = 1; for (std::vector::const_iterator j = i->scores.begin(); j != i->scores.end(); ++j, ++col) { - char text[16]; - sprintf(text, "%u", j->score); + char text[16] = ""; + if (j->score != -1) { + sprintf(text, "%u", j->score); + } unsigned this_width = my_draw_text(text, NULL, 22.0); if (j->chosen) { - if (j->score != -1) { - my_draw_text(text, buf, 22.0, x + max_num_width - this_width, y); - } + my_draw_text(text, buf, 22.0, x + max_num_width - this_width, y); my_draw_text((mode == 0) ? j->song.title : j->song.short_title, buf, 12.0, x + max_num_width + 10, y); } else { - if (j->score != -1) { - my_draw_text(text, buf, 22.0, x + width[col] / 2 - this_width / 2, y); - } + my_draw_text(text, buf, 22.0, x + width[col] / 2 - this_width / 2, y); } x += width[col] + 20; }