From 309d459a7027b66885ca9f678ae4fe316b1693f1 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 9 Aug 2026 15:00:44 +0200 Subject: [PATCH] fix apple clang warning for music test define this as constant otherwise compiler may treat the array as being variable in size for some reason --- src/m_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index b75cfa430..2d758743d 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -5775,13 +5775,12 @@ static void M_DrawMusicTest(void) V_DrawFill(20, y-4, 280-1, 16, 237); { - const musicdef_t *def = S_GetMusicCredit(t); const char *songname = def->title[0] ? def->title : def->source; size_t namelength = strlen(songname); - static const size_t MAXLENGTH = 34; +#define MAXLENGTH 34 char buf[MAXLENGTH+1]; if (t == st_sel && namelength > MAXLENGTH) @@ -5795,6 +5794,7 @@ static void M_DrawMusicTest(void) { V_DrawFill(20+280-9, y-4, 8, 16, 230); } +#undef MAXLENGTH } t++;