]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tty/tty_update.c
ncurses 5.9 - patch 20130119
[ncurses.git] / ncurses / tty / tty_update.c
index e9ad69811951f9831895fa162e710dd0f8b85eac..3253e54937cb92e433bdb889a45b7717b8e5ed55 100644 (file)
@@ -82,7 +82,7 @@
 
 #include <ctype.h>
 
 
 #include <ctype.h>
 
-MODULE_ID("$Id: tty_update.c,v 1.274 2013/01/12 17:24:22 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.275 2013/01/20 00:34:46 tom Exp $")
 
 /*
  * This define controls the line-breakout optimization.  Every once in a
 
 /*
  * This define controls the line-breakout optimization.  Every once in a
@@ -491,11 +491,12 @@ can_clear_with(NCURSES_SP_DCLx ARG_CH_T ch)
            return FALSE;
        if ((pair = GetPair(CHDEREF(ch))) != 0) {
            short fg, bg;
            return FALSE;
        if ((pair = GetPair(CHDEREF(ch))) != 0) {
            short fg, bg;
-           NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx
-                                          (short) pair,
-                                          &fg, &bg);
-           if (fg != C_MASK || bg != C_MASK)
+           if (NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx
+                                              (short) pair,
+                                              &fg, &bg) == ERR
+               || (fg != C_MASK || bg != C_MASK)) {
                return FALSE;
                return FALSE;
+           }
        }
 #else
        if (AttrOfD(ch) & A_COLOR)
        }
 #else
        if (AttrOfD(ch) & A_COLOR)