quadblitter: write nul, not space for transparent #1017

This commit is contained in:
nick black 2020-09-17 19:08:33 -04:00
parent 77a0dbbe94
commit a6bfd3f88e
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -294,7 +294,7 @@ qtrans_check(cell* c, bool bgr, bool blendcolors,
if(ffmpeg_trans_p(bgr, rgbbase_bl[3])){
// top and left are transparent
if(ffmpeg_trans_p(bgr, rgbbase_br[3])){
// entirety is transparent, load with space
// entirety is transparent, load with nul (but not NULL)
cell_set_fg_default(c);
egc = "";
}else{
@ -424,7 +424,7 @@ quadrant_blit(ncplane* nc, int placey, int placex, int linesize,
cell_set_fg_alpha(c, CELL_ALPHA_BLEND);
}
}
if(cell_load(nc, c, egc) <= 0){
if(*egc && cell_load(nc, c, egc) <= 0){
return -1;
}
++total;