mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-20 16:31:03 +00:00
S_MusicName copy music_name to new buffer (is this ok?)
This commit is contained in:
parent
34ea90600a
commit
0ea40321ca
1 changed files with 5 additions and 5 deletions
|
@ -1606,11 +1606,11 @@ boolean S_MusicPaused(void)
|
|||
|
||||
const char *S_MusicName(void)
|
||||
{
|
||||
// char *result[7];
|
||||
// strncpy(result, music_name, 7);
|
||||
// result[6] = 0;
|
||||
// return (const char *)&result;
|
||||
return music_name;
|
||||
//return music_name;
|
||||
char *result = (char *)malloc(7);
|
||||
strncpy(result, music_name, 7);
|
||||
result[6] = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
boolean S_MusicExists(const char *mname, boolean checkMIDI, boolean checkDigi)
|
||||
|
|
Loading…
Reference in a new issue