]> Kevux Git Server - fll/commitdiff
Bugfix: Non-debug mode error printing prints incorrectly.
authorKevin Day <Kevin@kevux.org>
Sat, 10 Jan 2026 22:44:03 +0000 (16:44 -0600)
committerKevin Day <Kevin@kevux.org>
Sat, 10 Jan 2026 22:44:03 +0000 (16:44 -0600)
A character is incorrectly printed when debug mode is disabled.

If the first character in the debug string is NULL, then do not print the wrapping parenthesis.

level_2/fll_error/c/private-error.c

index 59de36b938150dd970cb4b83dc364f46791618bc..4038b3b8a4ae674f1fafc2a0dff93484d9da3d8a 100644 (file)
@@ -352,14 +352,11 @@ extern "C" {
 #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
   void private_fll_error_print_debug(fl_print_t * const print, const f_string_t debug) {
 
-    if (debug) {
+    if (debug && *debug) {
       fl_print_format(macro_fll_error_s(019_debug_open), print->to, print->context);
       fl_print_format(f_string_format_S_single_s.string, print->to, print->notable, debug, print->notable);
       fl_print_format(macro_fll_error_s(020_debug_close), print->to, print->context);
     }
-    else {
-      fl_print_format(f_string_format_bracket_open_s.string, print->to, print->context);
-    }
   }
 #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)