Skip to content
Snippets Groups Projects
Commit 0ea40321 authored by Marco Z's avatar Marco Z
Browse files

S_MusicName copy music_name to new buffer (is this ok?)

parent 34ea9060
Branches
Tags
No related merge requests found
...@@ -1606,11 +1606,11 @@ boolean S_MusicPaused(void) ...@@ -1606,11 +1606,11 @@ boolean S_MusicPaused(void)
const char *S_MusicName(void) const char *S_MusicName(void)
{ {
// char *result[7]; //return music_name;
// strncpy(result, music_name, 7); char *result = (char *)malloc(7);
// result[6] = 0; strncpy(result, music_name, 7);
// return (const char *)&result; result[6] = 0;
return music_name; return result;
} }
boolean S_MusicExists(const char *mname, boolean checkMIDI, boolean checkDigi) boolean S_MusicExists(const char *mname, boolean checkMIDI, boolean checkDigi)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment