]> Kevux Git Server - fll/commitdiff
Cleanup: remove extra newline printing on exit after failsafe in verbose mode.
authorKevin Day <thekevinday@gmail.com>
Sun, 25 Apr 2021 17:58:03 +0000 (12:58 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 25 Apr 2021 17:58:03 +0000 (12:58 -0500)
level_3/controller/c/private-controller.c

index 22141815ff9e99fb564b1a62ee5778a361809fbe..3ae66d44ca670070fc844f38ab27e113cf8c0b8e 100644 (file)
@@ -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);
     }