Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Correctly test for __ISDIRTY.



details:   https://anonhg.NetBSD.org/src/rev/fe8c4a90f2bc
branches:  trunk
changeset: 766144:fe8c4a90f2bc
user:      jdc <jdc%NetBSD.org@localhost>
date:      Thu Jun 16 22:45:46 2011 +0000

description:
Correctly test for __ISDIRTY.
Problem noticed by (and test case provided by) blymn@.

diffstat:

 lib/libcurses/refresh.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 519fbe862fc6 -r fe8c4a90f2bc lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c   Thu Jun 16 22:40:17 2011 +0000
+++ b/lib/libcurses/refresh.c   Thu Jun 16 22:45:46 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refresh.c,v 1.73 2010/02/08 20:45:22 roy Exp $ */
+/*     $NetBSD: refresh.c,v 1.74 2011/06/16 22:45:46 jdc Exp $ */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)refresh.c  8.7 (Berkeley) 8/13/94";
 #else
-__RCSID("$NetBSD: refresh.c,v 1.73 2010/02/08 20:45:22 roy Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.74 2011/06/16 22:45:46 jdc Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -174,7 +174,7 @@
                            orig, sub_win);
 #endif
                        for (sy = 0; sy < sub_win->maxy; sy++) {
-                               if (sub_win->alines[sy]->flags == __ISDIRTY) {
+                               if (sub_win->alines[sy]->flags & __ISDIRTY) {
                                        orig->alines[sy + sub_win->begy - orig->begy]->flags
                                            |= __ISDIRTY;
                                        sub_win->alines[sy]->flags



Home | Main Index | Thread Index | Old Index