Fix incorrect strncpy in S_AL_StartBackgroundTrack

Error is loop argument is NULL.
Ensure that s_backgroundTrack is a null terminated string.
This commit is contained in:
Zack Middleton 2015-02-05 04:30:07 -06:00
parent 4e029b1f6b
commit 4fb053b8e7

View file

@ -2115,7 +2115,7 @@ void S_AL_StartBackgroundTrack( const char *intro, const char *loop )
issame = qfalse; issame = qfalse;
// Copy the loop over // Copy the loop over
strncpy( s_backgroundLoop, loop, sizeof( s_backgroundLoop ) ); Q_strncpyz( s_backgroundLoop, loop, sizeof( s_backgroundLoop ) );
if(!issame) if(!issame)
{ {