From f8ca942d841ec9cc4d669145c27d2cef778c111a Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 16 Jun 2021 05:39:47 -0400 Subject: [PATCH] term_bg_rgb8: fix longstanding FIXME now that we detect the bg #1292 --- src/lib/render.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/render.c b/src/lib/render.c index 3be45f68d..cc79b11a1 100644 --- a/src/lib/render.c +++ b/src/lib/render.c @@ -706,7 +706,11 @@ term_bg_rgb8(const tinfo* ti, FILE* out, unsigned r, unsigned g, unsigned b){ if((r == (ti->bg_collides_default & 0xff0000lu)) && (g == (ti->bg_collides_default & 0xff00lu)) && (b == (ti->bg_collides_default & 0xfflu))){ - ++b; // what if it's 255 FIXME + if(b < 255){ + ++b; + }else{ + --b; + } } } return term_esc_rgb(out, false, r, g, b);