demo: summary_table() failure is not immediate fail #2099

This commit is contained in:
nick black 2021-08-26 02:49:29 -04:00
parent 2feab02759
commit adbc26dd9b
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -572,9 +572,7 @@ int main(int argc, char** argv){
ncmenu_destroy(menu);
stop_input();
notcurses_render(nc); // rid ourselves of any remaining demo output
if(summary_table(nc, spec, canimage, canvideo)){
goto err;
}
int r = summary_table(nc, spec, canimage, canvideo);
notcurses_render(nc); // render our summary table
free(results);
if(notcurses_stop(nc)){
@ -583,7 +581,7 @@ int main(int argc, char** argv){
if(json && summary_json(json, spec, dimy, dimx)){
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
return r ? EXIT_FAILURE : EXIT_SUCCESS;
err:
stop_input();