X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmainerror.C;h=eec7f8a1b66f87c8161b2874c14637f1131c58d3;hb=5621db270ccbeabc106e0f438941dba6f930652b;hp=4dc01aece5b42b5bb4ff20df29c910c2f86b7757;hpb=ce9d2233f4653ae54ee7bdfa4a7313326a9d8240;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/mainerror.C b/cinelerra-5.1/cinelerra/mainerror.C index 4dc01aec..eec7f8a1 100644 --- a/cinelerra-5.1/cinelerra/mainerror.C +++ b/cinelerra-5.1/cinelerra/mainerror.C @@ -193,13 +193,9 @@ void MainError::show_error_local(const char *string) void MainError::show_error(const char *string) { - if( main_error ) - main_error->show_error_local(string); - else { - printf("%s", string); - if( string[strlen(string) - 1] != '\n' ) - printf("\n"); - } + if( main_error ) main_error->show_error_local(string); + int len = strlen(string); + printf("%s%s", string, len>0 && string[len-1] == '\n' ? "" : "\n"); }