summaryrefslogtreecommitdiff
path: root/src/music
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-09-29 16:27:02 +0000
committerrubidium <rubidium@openttd.org>2008-09-29 16:27:02 +0000
commit5ab74534da3f94cd1c43bc438dcc0d31b23408e5 (patch)
tree43b0c8873ef3d08bb3099e46a3bc152bc8cd010d /src/music
parentd34da3cadbd0e7776244fc45915f23b1e9f28c7f (diff)
downloadopenttd-5ab74534da3f94cd1c43bc438dcc0d31b23408e5.tar.xz
(svn r14414) -Fix: replace instances of strncpy with strecpy as strncpy doesn't guarantee the resulting string is '\0'-terminated.
Diffstat (limited to 'src/music')
-rw-r--r--src/music/win32_m.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp
index ef2c826b3..c9fc6ece0 100644
--- a/src/music/win32_m.cpp
+++ b/src/music/win32_m.cpp
@@ -22,6 +22,7 @@ static FMusicDriver_Win32 iFMusicDriver_Win32;
void MusicDriver_Win32::PlaySong(const char *filename)
{
+ assert(filename != NULL);
strcpy(_midi.start_song, filename);
_midi.playing = true;
_midi.stop_song = false;