Handle empty/"-" music lump name on music change

This commit is contained in:
spherallic 2023-08-02 17:05:38 +02:00 committed by NepDisk
parent d372c1f07a
commit b12ac5d3b2

View file

@ -2953,11 +2953,13 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
// Change the music and apply position/fade operations
else
{
if (!stringargs[0])
break;
strncpy(mapmusname, stringargs[0], 7);
mapmusname[6] = 0;
if (!stringargs[0] || fastcmp(stringargs[0], "-"))
strcpy(mapmusname, "");
else
{
strncpy(mapmusname, stringargs[0], 7);
mapmusname[6] = 0;
}
mapmusflags = tracknum & MUSIC_TRACKMASK;