notcurses_core_init: flush following sprite_clear_all()

This commit is contained in:
nick black 2021-07-27 07:56:11 -04:00
parent 24ccb66a20
commit 272607a07c
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -1208,7 +1208,7 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){
// the sprite clear ought take place within the alternate screen, if it's // the sprite clear ought take place within the alternate screen, if it's
// being used. // being used.
if(!(opts->flags & NCOPTION_NO_CLEAR_BITMAPS)){ if(!(opts->flags & NCOPTION_NO_CLEAR_BITMAPS)){
if(sprite_clear_all(&ret->tcache, ret->ttyfp)){ if(sprite_clear_all(&ret->tcache, ret->ttyfp) || fflush(ret->ttyfp)){
free_plane(ret->stdplane); free_plane(ret->stdplane);
goto err; goto err;
} }