diff options
author | dholland <dholland@NetBSD.org> | 2009-03-15 22:19:23 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-03-15 22:19:23 +0000 |
commit | df25e08ef3bbcd6e7f205249eaaaf44635eb266e (patch) | |
tree | d4fe113e3eaee33a7baa54acbae53011554075e9 /sail | |
parent | 7018c80faab5e958bea20bd639260b3869d84ddf (diff) | |
download | bsdgames-darwin-df25e08ef3bbcd6e7f205249eaaaf44635eb266e.tar.gz bsdgames-darwin-df25e08ef3bbcd6e7f205249eaaaf44635eb266e.tar.zst bsdgames-darwin-df25e08ef3bbcd6e7f205249eaaaf44635eb266e.zip |
Simplify previous; suggested by Paul Goyette
Diffstat (limited to 'sail')
-rw-r--r-- | sail/pl_7.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sail/pl_7.c b/sail/pl_7.c index fe8c5f29..001d4b09 100644 --- a/sail/pl_7.c +++ b/sail/pl_7.c @@ -1,4 +1,4 @@ -/* $NetBSD: pl_7.c,v 1.36 2009/03/15 20:11:24 dholland Exp $ */ +/* $NetBSD: pl_7.c,v 1.37 2009/03/15 22:19:23 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: pl_7.c,v 1.36 2009/03/15 20:11:24 dholland Exp $"); +__RCSID("$NetBSD: pl_7.c,v 1.37 2009/03/15 22:19:23 dholland Exp $"); #endif #endif /* not lint */ @@ -216,6 +216,7 @@ draw_scroll(void) werase(scroll_w); + /* XXX: SCROLL_Y and whatnot should be unsigned too */ visible_lines = SCROLL_Y - 1; total_lines = stringarray_num(sc_lines); @@ -230,8 +231,7 @@ draw_scroll(void) index_of_top -= sc_scrollup; } - /* XXX: SCROLL_Y and whatnot should be unsigned too */ - for (y = 0; y < (unsigned) (SCROLL_Y - 1); y++) { + for (y = 0; y < visible_lines; y++) { index_of_y = index_of_top + y; if (index_of_y >= total_lines) { break; |