Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/wscons deal with negative cache sizes



details:   https://anonhg.NetBSD.org/src/rev/b9f2aa139e53
branches:  trunk
changeset: 780101:b9f2aa139e53
user:      macallan <macallan%NetBSD.org@localhost>
date:      Thu Jul 12 01:21:08 2012 +0000

description:
deal with negative cache sizes

diffstat:

 sys/dev/wscons/wsdisplay_glyphcache.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r e2e51cb47c2c -r b9f2aa139e53 sys/dev/wscons/wsdisplay_glyphcache.c
--- a/sys/dev/wscons/wsdisplay_glyphcache.c     Thu Jul 12 01:20:22 2012 +0000
+++ b/sys/dev/wscons/wsdisplay_glyphcache.c     Thu Jul 12 01:21:08 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wsdisplay_glyphcache.c,v 1.2 2012/04/19 08:46:17 macallan Exp $        */
+/*     $NetBSD: wsdisplay_glyphcache.c,v 1.3 2012/07/12 01:21:08 macallan Exp $        */
 
 /*
  * Copyright (c) 2012 Michael Lorenz
@@ -47,6 +47,7 @@
        gc->gc_cellheight = cellheight;
        gc->gc_firstline = first;
        gc->gc_cellsperline = width / cellwidth;
+       if (lines < 0) lines = 0;
        cache_lines = lines / cellheight;
        gc->gc_numcells = cache_lines * gc->gc_cellsperline;
        if (gc->gc_numcells > 256)



Home | Main Index | Thread Index | Old Index