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

@@ -43,7 +43,7 @@ struct MusicSystem {
uint set_index; ///< index of song in set
PlaylistEntry(const MusicSet *set, uint set_index) : MusicSongInfo(set->songinfo[set_index]), set(set), set_index(set_index) { }
bool IsValid() const { return !StrEmpty(this->songname); }
bool IsValid() const { return !this->songname.empty(); }
};
typedef std::vector<PlaylistEntry> Playlist;