From 9da27ad5785093d18bbe85f65c3a96e26ee21816 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 21 May 2017 13:48:10 -0700 Subject: [PATCH] GUACAMOLE-280: Ensure bold and half-bright attributes cancel each other out. --- src/terminal/display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/terminal/display.c b/src/terminal/display.c index a1f37b3e..de2cae5a 100644 --- a/src/terminal/display.c +++ b/src/terminal/display.c @@ -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;