mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 09:15:38 +00:00
Fixed non-null terminated string issue with music playlist
git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@18 ea6a568a-9f4f-0410-981a-c910a81bb256
This commit is contained in:
parent
da94867474
commit
31242e9940
1 changed files with 3 additions and 4 deletions
|
@ -26,6 +26,8 @@ module sound.music;
|
|||
import sound.audiere;
|
||||
import sound.audio;
|
||||
|
||||
import std.string;
|
||||
|
||||
import core.config;
|
||||
import core.resource;
|
||||
|
||||
|
@ -178,10 +180,7 @@ struct MusicManager
|
|||
index = 0;
|
||||
}
|
||||
|
||||
// Make sure the string is null terminated
|
||||
assert(*(playlist[index].ptr+playlist[index].length) == 0);
|
||||
|
||||
music = cpp_playStream(playlist[index].ptr, volume);
|
||||
music = cpp_playStream(toStringz(playlist[index]), volume);
|
||||
|
||||
if(!music) fail("Unable to start music track " ~ playlist[index]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue