diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-08-22 14:27:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-08-22 14:27:16 +0400 |
commit | f88dabae8a611c4fd13f441abb51f0e11d6454c3 (patch) | |
tree | a012f1962b7b38c0422b482778d2ade41ac460f3 /source/gameengine/Converter/KX_ConvertActuators.cpp | |
parent | eab746fc5facc02e9885570c1f05e753278cbc33 (diff) |
BGE data conversion was making sound paths absolute, modify a copy rather then the original.
Diffstat (limited to 'source/gameengine/Converter/KX_ConvertActuators.cpp')
-rw-r--r-- | source/gameengine/Converter/KX_ConvertActuators.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index cb2521de9a4..b1f86afa4ee 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -384,8 +384,12 @@ void BL_ConvertActuators(char* maggiename, else { /* but we need to convert the samplename into absolute pathname first */ - BLI_convertstringcode(soundact->sound->name, maggiename); - samplename = soundact->sound->name; + char fullpath[sizeof(soundact->sound->name)]; + + /* dont modify soundact->sound->name, only change a copy */ + BLI_strncpy(fullpath, soundact->sound->name, sizeof(fullpath)); + BLI_convertstringcode(fullpath, maggiename); + samplename = fullpath; /* and now we can load it */ if (soundscene->LoadSample(samplename, NULL, 0) > -1) |