diff options
author | 1997-12-14 23:15:36 +0000 | |
---|---|---|
committer | 1997-12-14 23:15:36 +0000 | |
commit | d2ffe6bf7b0cd86fe399a2efc19fa1415cfaf318 (patch) | |
tree | 864ea84dbd1bce6237cf47ecad8ddbcf89531f33 /lib/libcurses/lib_overlay.c | |
parent | check the length of data in memcpy's (diff) | |
download | wireguard-openbsd-d2ffe6bf7b0cd86fe399a2efc19fa1415cfaf318.tar.xz wireguard-openbsd-d2ffe6bf7b0cd86fe399a2efc19fa1415cfaf318.zip |
ncurses-4.1-971213
Diffstat (limited to 'lib/libcurses/lib_overlay.c')
-rw-r--r-- | lib/libcurses/lib_overlay.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libcurses/lib_overlay.c b/lib/libcurses/lib_overlay.c index e67c39e9587..991e84147d1 100644 --- a/lib/libcurses/lib_overlay.c +++ b/lib/libcurses/lib_overlay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_overlay.c,v 1.3 1997/12/03 05:21:26 millert Exp $ */ +/* $OpenBSD: lib_overlay.c,v 1.4 1997/12/14 23:15:47 millert Exp $ */ /*************************************************************************** @@ -31,7 +31,7 @@ #include <curses.priv.h> -MODULE_ID("Id: lib_overlay.c,v 1.9 1997/09/20 15:02:34 juergen Exp $") +MODULE_ID("Id: lib_overlay.c,v 1.10 1997/12/03 15:47:41 Alexander.V.Lukyanov Exp $") static int overlap(const WINDOW *const s, WINDOW *const d, int const flag) { @@ -91,6 +91,8 @@ int copywin(const WINDOW *src, WINDOW *dst, { int sx, sy, dx, dy; bool touched; +chtype bk = AttrOf(dst->_bkgd); +chtype mask = ~(chtype)((bk&A_COLOR) ? A_COLOR : 0); T((T_CALLED("copywin(%p, %p, %d, %d, %d, %d, %d, %d, %d)"), src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over)); @@ -122,7 +124,8 @@ bool touched; if ((TextOf(src->_line[sy].text[sx]) != ' ') && (dst->_line[dy].text[dx]!=src->_line[sy].text[sx])) { - dst->_line[dy].text[dx] = src->_line[sy].text[sx]; + dst->_line[dy].text[dx] = + (src->_line[sy].text[sx] & mask) | bk; touched = TRUE; } } |