GUACAMOLE-280: Ensure bold and half-bright attributes cancel each other out.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/9da27ad5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/9da27ad5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/9da27ad5 Branch: refs/heads/master Commit: 9da27ad5785093d18bbe85f65c3a96e26ee21816 Parents: 2146200 Author: Michael Jumper <[email protected]> Authored: Sun May 21 13:48:10 2017 -0700 Committer: Michael Jumper <[email protected]> Committed: Sun May 21 13:48:10 2017 -0700 ---------------------------------------------------------------------- src/terminal/display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/9da27ad5/src/terminal/display.c ---------------------------------------------------------------------- diff --git a/src/terminal/display.c b/src/terminal/display.c index a1f37b3..de2cae5 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;
