[sixel] don't duplicate calls to write_rle() #2537

pull/2599/head
nick black 2 years ago
parent 2ff212446d
commit 9c080ba153
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -448,8 +448,8 @@ wipe_color(sixelband* b, int color, int startx, int endx,
int rle = 0; // the repetition number for this element
// the x coordinate through which we've checked this band. if x + rle is
// less than startx, this element cannot be affected by the wipe.
// otherwise, starting at startx, it can be affected. once x > endx, we
// are done, and can copy the remaining elements blindly.
// otherwise, starting at startx, it can be affected. once x >= endx, we
// are done, and can copy any remaining elements blindly.
int x = 0;
int voff = 0;
while(*vec){
@ -498,7 +498,7 @@ wipe_color(sixelband* b, int color, int startx, int endx,
rle = 0;
}
++vec;
if(x > endx){
if(x >= endx){
strcpy(newvec + voff, vec); // there is always room
break;
}

Loading…
Cancel
Save