mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
[ncplane_resize_internal] correct tozorch calculation
This commit is contained in:
parent
1f713c4e47
commit
1322fabbb7
@ -857,7 +857,7 @@ int ncplane_resize_internal(ncplane* n, int keepy, int keepx,
|
|||||||
}else if(realloced){
|
}else if(realloced){
|
||||||
// the x dimensions are equal, and we're keeping across the width. only the
|
// the x dimensions are equal, and we're keeping across the width. only the
|
||||||
// y dimension changed. at worst, we need zero some out.
|
// y dimension changed. at worst, we need zero some out.
|
||||||
unsigned tozorch = (ylen - keepleny) * xlen;
|
unsigned tozorch = (ylen - keepleny) * xlen * sizeof(*fb);
|
||||||
if(tozorch){
|
if(tozorch){
|
||||||
unsigned zorchoff = keepleny * xlen;
|
unsigned zorchoff = keepleny * xlen;
|
||||||
memset(fb + zorchoff, 0, tozorch);
|
memset(fb + zorchoff, 0, tozorch);
|
||||||
|
Loading…
Reference in New Issue
Block a user