Source-Changes-HG archive

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

[src/trunk]: src/games/tetris fix the previous. the code was right, just bad...



details:   https://anonhg.NetBSD.org/src/rev/8914c38232a0
branches:  trunk
changeset: 833415:8914c38232a0
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Jun 24 12:55:36 2018 +0000

description:
fix the previous.  the code was right, just badly formatted before.

should fix infinite loops reported in some cases.

diffstat:

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

diffs (21 lines):

diff -r a2d13a533e4e -r 8914c38232a0 games/tetris/scores.c
--- a/games/tetris/scores.c     Sun Jun 24 12:25:33 2018 +0000
+++ b/games/tetris/scores.c     Sun Jun 24 12:55:36 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scores.c,v 1.23 2018/02/04 08:48:05 mrg Exp $  */
+/*     $NetBSD: scores.c,v 1.24 2018/06/24 12:55:36 mrg Exp $  */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -830,9 +830,8 @@
                                continue;
                        }
                }
-       }
-        if (sp->hs_level < NLEVELS && sp->hs_level >= 0) {
-               levelfound[sp->hs_level] = 1;
+               if (sp->hs_level < NLEVELS && sp->hs_level >= 0)
+                       levelfound[sp->hs_level] = 1;
                i++, sp++;
        }
        return (num > MAXHISCORES ? MAXHISCORES : num);



Home | Main Index | Thread Index | Old Index