ncplane_erase(): only zero out gcluster #586

This commit is contained in:
nick black 2020-05-09 07:05:48 -04:00
parent f6a7adc7e8
commit 4eb4c2909f
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -1784,7 +1784,9 @@ void ncplane_erase(ncplane* n){
memset(n->fb, 0, sizeof(*n->fb) * n->lenx * n->leny);
egcpool_dump(&n->pool);
egcpool_init(&n->pool);
cell_init(&n->basecell);
// we need to zero out the EGC before handing this off to cell_load, but
// we don't want to lose the channels/attributes, so explicit gcluster load.
n->basecell.gcluster = 0;
cell_load(n, &n->basecell, egc);
free(egc);
n->y = n->x = 0;