AGS: Fixed snprintf in PlayMP3File()

From upstream c31549be0efabafe7c63e5d51f2b19bd7ccff9d0
This commit is contained in:
Paul Gilbert 2022-03-19 12:29:38 -07:00
parent 0988fbbe78
commit 9e68fb7852

View File

@ -395,7 +395,7 @@ void PlayMP3File(const char *filename) {
_GP(play).cur_music_number = 1000;
// save the filename (if it's not what we were supplied with)
if (filename != &_GP(play).playmp3file_name[0])
snprintf(_GP(play).playmp3file_name, sizeof(_GP(play).playmp3file_name), filename);
snprintf(_GP(play).playmp3file_name, sizeof(_GP(play).playmp3file_name), "%s", filename);
} else {
delete clip;
clip = nullptr;