From 83f6542f2073e28555d2a19d08ef58fabfc231ea Mon Sep 17 00:00:00 2001 From: Christian Barcenas Date: Thu, 21 Aug 2025 14:46:33 -0500 Subject: [PATCH] ui-shared: don't write if favicon unset Since the favicon setting defaults to "/favicon.ico", the user can only unset it with favicon=. However, that would write an empty string as the config value. Previously, such empty string always satisfied the if condition. In this case it is better to omit the entirely. Signed-off-by: Christian Barcenas Signed-off-by: Christian Hesse --- ui-shared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-shared.c b/ui-shared.c index aa95b87..bb9d817 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -838,7 +838,7 @@ void cgit_print_docstart(void) else emit_js_link(NULL, "/cgit.js"); - if (ctx.cfg.favicon) { + if (ctx.cfg.favicon && *ctx.cfg.favicon) { html("\n");