aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cruise/sound.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index ba0b9a18bd..a68323cc43 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -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);