[sixel_refresh] bounds-check when damaging render state #2287

pull/2292/head
nick black 3 years ago
parent 2b86835faa
commit 86b81dfbd1

@ -388,9 +388,11 @@ void sixel_refresh(const ncpile* p, sprixel* s){
int idx = y * s->dimx + x;
if(s->needs_refresh[idx]){
const int xx = absx + x;
int ridx = yy * p->dimx + xx;
struct crender *r = &p->crender[ridx];
r->s.damaged = 1;
if(xx < p->dimx && yy < p->dimy){
int ridx = yy * p->dimx + xx;
struct crender *r = &p->crender[ridx];
r->s.damaged = 1;
}
}
}
}

Loading…
Cancel
Save