GUACAMOLE-280: Ensure bold and half-bright attributes cancel each other out.

This commit is contained in:
Michael Jumper 2017-05-21 13:48:10 -07:00
parent 2146200dfd
commit 9da27ad578

View File

@ -118,7 +118,7 @@ int __guac_terminal_set_colors(guac_terminal_display* display,
}
/* Handle bold */
if (attributes->bold
if (attributes->bold && !attributes->half_bright
&& foreground->palette_index >= GUAC_TERMINAL_FIRST_DARK
&& foreground->palette_index <= GUAC_TERMINAL_LAST_DARK) {
foreground = &guac_terminal_palette[foreground->palette_index
@ -129,7 +129,7 @@ int __guac_terminal_set_colors(guac_terminal_display* display,
display->glyph_background = *background;
/* Modify color if half-bright (low intensity) */
if (attributes->half_bright) {
if (attributes->half_bright && !attributes->bold) {
display->glyph_foreground.red /= 2;
display->glyph_foreground.green /= 2;
display->glyph_foreground.blue /= 2;