__newwin - fix BGWCOL initialization.

From Michael Forney in PR lib/56174
This commit is contained in:
uwe 2021-05-15 11:06:07 +00:00
parent e5aaa45327
commit 21d563f5dc

View File

@ -1,4 +1,4 @@
/* $NetBSD: newwin.c,v 1.58 2020/07/14 04:39:39 uwe Exp $ */
/* $NetBSD: newwin.c,v 1.59 2021/05/15 11:06:07 uwe Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)newwin.c 8.3 (Berkeley) 7/27/94";
#else
__RCSID("$NetBSD: newwin.c,v 1.58 2020/07/14 04:39:39 uwe Exp $");
__RCSID("$NetBSD: newwin.c,v 1.59 2021/05/15 11:06:07 uwe Exp $");
#endif
#endif /* not lint */
@ -144,9 +144,7 @@ __newwin(SCREEN *screen, int nlines, int ncols, int by, int bx, int ispad,
win->bch = ' ';
if (__using_color)
win->battr = __default_color;
else
win->battr = 0;
win->battr |= __default_color;
win->nextp = win;
win->ch_off = 0;
win->orig = NULL;
@ -386,6 +384,7 @@ __makenew(SCREEN *screen, int nlines, int ncols, int by, int bx, int sub,
win->flags = (__IDLINE | __IDCHAR);
win->delay = -1;
win->wattr = 0;
win->battr = 0;
#ifdef HAVE_WCHAR
win->bnsp = NULL;
SET_BGWCOL(*win, 1);