]> git.sesse.net Git - ccbs/commitdiff
Actually check in changes from last time...
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 20 Feb 2005 14:08:10 +0000 (14:08 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 20 Feb 2005 14:08:10 +0000 (14:08 +0000)
bigscreen/groupscreen.cpp

index 441117d45e29f95e58056748ab2add1635b5a93e..7e45628851225e48da81b472d789fb6d098ecfe9 100644 (file)
@@ -121,19 +121,17 @@ void GroupScreen::draw(unsigned char *buf)
 
                unsigned col = 1;
                for (std::vector<Score>::const_iterator j = i->scores.begin(); j != i->scores.end(); ++j, ++col) {
 
                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) {
        
                        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 {
                                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;
                }
                        }
                        x += width[col] + 20;
                }