Fix: Truncated music-set song names cause warning log.

The music-set does not need to be selected for this to occur.

Resolved by using std::string instead of fixed buffer for song names,
which avoids manual string copying and removes the length limit.
This commit is contained in:
Peter Nelson
2023-01-26 14:58:51 +00:00
committed by PeterN
parent 2d3250923c
commit 1ec34acb51
3 changed files with 4 additions and 6 deletions

View File

@@ -289,7 +289,7 @@ enum MusicTrackType {
/** Metadata about a music track. */
struct MusicSongInfo {
char songname[32]; ///< name of song displayed in UI
std::string songname; ///< name of song displayed in UI
byte tracknr; ///< track number of song displayed in UI
const char *filename; ///< file on disk containing song (when used in MusicSet class, this pointer is owned by MD5File object for the file)
MusicTrackType filetype; ///< decoder required for song file