Skip to content

Commit

Permalink
term_bg_rgb8: fix longstanding FIXME now that we detect the bg #1292
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Jun 16, 2021
1 parent 302d692 commit f8ca942
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f8ca942

Please sign in to comment.