unsigned col = 1;
for (std::vector<Score>::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;
}