Fixed what looks like an obvious error in loadSong() that Valgrind caught.

svn-id: r40504
This commit is contained in:
Torbjörn Andersson 2009-05-12 19:24:11 +00:00
parent 72686a5a9e
commit 9c18a12fa0

View File

@ -119,8 +119,9 @@ void MusicPlayer::loadSong(const char *name) {
// Get the file without the extension
strcpy(baseName, name);
char *p = strchr(tempName, '.');
if (p) *p = '\0';
char *p = strchr(baseName, '.');
if (p)
*p = '\0';
// Get the instruments states file
strcpy(tempName, baseName);