From 3bdb53fe252c3be44621e6032fa223be2175a762 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 12 Dec 2023 00:40:44 -0500 Subject: [PATCH] follow-up to earlier music.c change After a music.c change earlier today, an annoying compiler warning resulted. .\music.c(721): warning C4295: 'notes': array is too small to include a terminating null character --- src/music.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/music.c b/src/music.c index 4dde9671c..1dbc82676 100644 --- a/src/music.c +++ b/src/music.c @@ -718,7 +718,7 @@ do_improvisation(struct obj* instr) static char * improvised_notes(boolean *same_as_last_time) { - static const char notes[7] = "ABCDEFG"; /* 7: no trailing '\0' */ + static char notes[7] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G' }; /* target buffer has to be in gc.context, otherwise saving game * between improvised recitals would not be able to maintain * the same_as_last_time context. */