From: Bart House Date: Mon, 9 Oct 2017 00:33:20 +0000 (-0700) Subject: Win32GUI: Fix bug with specifying no color for status hilite. X-Git-Tag: NetHack-3.6.1_RC01~297 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c24b420a9ba0b66760fb0e726c2da2ef27c7e41;p=nethack Win32GUI: Fix bug with specifying no color for status hilite. We were mapping NO_COLOR to white instead of the default foreground color. --- diff --git a/win/win32/mhstatus.c b/win/win32/mhstatus.c index 5e522b7b1..fe1badb48 100644 --- a/win/win32/mhstatus.c +++ b/win/win32/mhstatus.c @@ -275,7 +275,8 @@ onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) else if (atr & HL_DIM) fntatr = ATR_DIM; fnt = mswin_get_font(NHW_STATUS, fntatr, hdc, FALSE); - nFg = (clr >= 0 && clr < CLR_MAX) ? nhcolor_to_RGB(clr) : Fg; + nFg = (clr == NO_COLOR ? Fg : + ((clr >= 0 && clr < CLR_MAX) ? nhcolor_to_RGB(clr) : Fg)); nBg = Bg; GetTextExtentPoint32(hdc, wbuf, vlen, &sz);