From cb12a4eee54ae1efea8f1cd7fec93c105053c613 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 25 Apr 2021 12:58:03 -0500 Subject: [PATCH] Cleanup: remove extra newline printing on exit after failsafe in verbose mode. --- level_3/controller/c/private-controller.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/level_3/controller/c/private-controller.c b/level_3/controller/c/private-controller.c index 2214181..3ae66d4 100644 --- a/level_3/controller/c/private-controller.c +++ b/level_3/controller/c/private-controller.c @@ -1358,7 +1358,12 @@ extern "C" { fprintf(main->data->output.stream, "%c", f_string_eol_s[0]); fprintf(main->data->output.stream, "Done processing %s item '", is_entry ? controller_string_entry_s : controller_string_exit_s); fprintf(main->data->output.stream, "%s%s%s", main->data->context.set.title.before->string, controller_string_main_s, main->data->context.set.title.after->string); - fprintf(main->data->output.stream, "'.%c%c", f_string_eol_s[0], f_string_eol_s[0]); + fprintf(main->data->output.stream, "'.%c", f_string_eol_s[0]); + + // failsafe should not print the extra newline because the failure exit from controller_main should handle this. + if (!failsafe) { + fprintf(main->data->output.stream, "%c", f_string_eol_s[0]); + } controller_print_unlock_flush(main->data->output.stream, &main->thread->lock.print); } -- 1.8.3.1