From 61448e1506360d651b98ad7cc3f24786308846b0 Mon Sep 17 00:00:00 2001 From: "Rob Swindell (on Debian Linux)" <rob@synchro.net> Date: Tue, 14 Feb 2023 23:02:11 -0800 Subject: [PATCH] Fix list() width when WIN_NOBRDR is used The title isn't displayed in this mode, so the title length is 0. Why is title being strdup()'d here? Something to look into. --- src/uifc/uifc32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c index b7e0bfa1c2..a751e8ece6 100644 --- a/src/uifc/uifc32.c +++ b/src/uifc/uifc32.c @@ -667,7 +667,7 @@ int ulist(int64_t mode, int left, int top, int width, int *cur, int *bar if(!(api->mode&UIFC_NHM)) uifc_mouse_disable(); - title_len=strlen(title); + title_len=(mode & WIN_NOBRDR) ? 0 :strlen(title); if(mode&WIN_FAT) { s_top=1; -- GitLab