From be97384b0185c2f7c0a89589d679f850104a4d64 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 7b5d81bf7..0b9279927 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -5777,13 +5777,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) @@ -5797,6 +5796,7 @@ static void M_DrawMusicTest(void) { V_DrawFill(20+280-9, y-4, 8, 16, 230); } +#undef MAXLENGTH } t++;