mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
[sixel_refresh] bounds-check when damaging render state #2287
This commit is contained in:
parent
2b86835faa
commit
86b81dfbd1
@ -388,9 +388,11 @@ void sixel_refresh(const ncpile* p, sprixel* s){
|
|||||||
int idx = y * s->dimx + x;
|
int idx = y * s->dimx + x;
|
||||||
if(s->needs_refresh[idx]){
|
if(s->needs_refresh[idx]){
|
||||||
const int xx = absx + x;
|
const int xx = absx + x;
|
||||||
int ridx = yy * p->dimx + xx;
|
if(xx < p->dimx && yy < p->dimy){
|
||||||
struct crender *r = &p->crender[ridx];
|
int ridx = yy * p->dimx + xx;
|
||||||
r->s.damaged = 1;
|
struct crender *r = &p->crender[ridx];
|
||||||
|
r->s.damaged = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user