Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/tetris Fix high score table formatting bug.



details:   https://anonhg.NetBSD.org/src/rev/600d1a75cc29
branches:  trunk
changeset: 480819:600d1a75cc29
user:      jsm <jsm%NetBSD.org@localhost>
date:      Fri Jan 21 00:54:53 2000 +0000

description:
Fix high score table formatting bug.

Bug report and fix from Malcolm Parsons <malcolm%bits.bris.ac.uk@localhost>.

diffstat:

 games/tetris/scores.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 72215eadda26 -r 600d1a75cc29 games/tetris/scores.c
--- a/games/tetris/scores.c     Fri Jan 21 00:27:03 2000 +0000
+++ b/games/tetris/scores.c     Fri Jan 21 00:54:53 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scores.c,v 1.8 1999/09/18 19:38:55 jsm Exp $   */
+/*     $NetBSD: scores.c,v 1.9 2000/01/21 00:54:53 jsm Exp $   */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -435,10 +435,9 @@
                                (void)putchar('\n');
                                continue;
                        }
-                       (void)printf(item + offset < 10 ? "  " : " ");
                        sp = &hs[item];
                        (void)sprintf(buf,
-                           "%d%c %6d  %-11s (%d on %d)",
+                           "%3d%c %6d  %-11s (%6d on %d)",
                            item + offset, sp->hs_time ? '*' : ' ',
                            sp->hs_score * sp->hs_level,
                            sp->hs_name, sp->hs_score, sp->hs_level);



Home | Main Index | Thread Index | Old Index