Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion code/client/snd_dma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4085,7 +4085,12 @@ static qboolean S_StartBackgroundTrack_Actual( MusicInfo_t *pMusicInfo, qboolean
char dump[16];
char name[MAX_QPATH];

Q_strncpyz( sMusic_BackgroundLoop, loop, sizeof( sMusic_BackgroundLoop ));
char *bgLoop = sMusic_BackgroundLoop;

if ( bgLoop != loop )
{// don't copy into yourself
Q_strncpyz( sMusic_BackgroundLoop, loop, sizeof( sMusic_BackgroundLoop ));
}

Q_strncpyz( name, intro, sizeof( name ) - 4 ); // this seems to be so that if the filename hasn't got an extension
// but doesn't have the room to append on either then you'll just
Expand Down
7 changes: 6 additions & 1 deletion codemp/client/snd_dma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4093,7 +4093,12 @@ static qboolean S_StartBackgroundTrack_Actual( MusicInfo_t *pMusicInfo, qboolean
char dump[16];
char name[MAX_QPATH];

Q_strncpyz( sMusic_BackgroundLoop, loop, sizeof( sMusic_BackgroundLoop ));
char *bgLoop = sMusic_BackgroundLoop;

if ( bgLoop != loop )
{// don't copy into yourself
Q_strncpyz( sMusic_BackgroundLoop, loop, sizeof( sMusic_BackgroundLoop ));
}

Q_strncpyz( name, intro, sizeof( name ) - 4 ); // this seems to be so that if the filename hasn't got an extension
// but doesn't have the room to append on either then you'll just
Expand Down
Loading