From 11a6c92def985710eca79733f136b471d474b053 Mon Sep 17 00:00:00 2001 From: Christian Barcenas Date: Thu, 21 Aug 2025 14:46:33 -0500 Subject: 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 838170a..7f2d566 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -832,7 +832,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"); -- cgit v1.3