updated for version 7.4.679 Problem: Color values greater than 255 cause problems on MS-Windows. Solution: Truncate to 255 colors. (Yasuhiro Matsumoto)

This commit is contained in:
Bram Moolenaar
2015-03-24 21:28:46 +01:00
committed by Douglas Drumond
parent f04207e1f6
commit a91c468d33
2 changed files with 5 additions and 3 deletions
+3 -3
View File
@@ -5262,7 +5262,7 @@ gotoxy(
static void
textattr(WORD wAttr)
{
g_attrCurrent = wAttr;
g_attrCurrent = wAttr & 0xff;
SetConsoleTextAttribute(g_hConOut, wAttr);
}
@@ -5271,7 +5271,7 @@ textattr(WORD wAttr)
static void
textcolor(WORD wAttr)
{
g_attrCurrent = (g_attrCurrent & 0xf0) + wAttr;
g_attrCurrent = (g_attrCurrent & 0xf0) + (wAttr & 0x0f);
SetConsoleTextAttribute(g_hConOut, g_attrCurrent);
}
@@ -5280,7 +5280,7 @@ textcolor(WORD wAttr)
static void
textbackground(WORD wAttr)
{
g_attrCurrent = (g_attrCurrent & 0x0f) + (wAttr << 4);
g_attrCurrent = (g_attrCurrent & 0x0f) + ((wAttr & 0x0f) << 4);
SetConsoleTextAttribute(g_hConOut, g_attrCurrent);
}
+2
View File
@@ -756,6 +756,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
679,
/**/
678,
/**/