From e0561dbded57f195e7842cf69764e3ee2c3a71da Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sun, 21 Feb 2021 17:03:19 +0100 Subject: Fix #8713: Change OTTD2FS and FS2OTTD to return string objects instead of static buffers --- src/music/dmusic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/music/dmusic.cpp') diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp index c9447206a..619a20d8b 100644 --- a/src/music/dmusic.cpp +++ b/src/music/dmusic.cpp @@ -430,7 +430,7 @@ bool DLSFile::ReadDLSWaveList(FILE *f, DWORD list_length) bool DLSFile::LoadFile(const wchar_t *file) { - DEBUG(driver, 2, "DMusic: Try to load DLS file %s", FS2OTTD(file)); + DEBUG(driver, 2, "DMusic: Try to load DLS file %s", FS2OTTD(file).c_str()); FILE *f = _wfopen(file, L"rb"); if (f == nullptr) return false; @@ -881,7 +881,7 @@ static const char *LoadDefaultDLSFile(const char *user_dls) if (!dls_file.LoadFile(path)) return "Can't load GM DLS collection"; } } else { - if (!dls_file.LoadFile(OTTD2FS(user_dls))) return "Can't load GM DLS collection"; + if (!dls_file.LoadFile(OTTD2FS(user_dls).c_str())) return "Can't load GM DLS collection"; } /* Get download port and allocate download IDs. */ -- cgit v1.2.3-70-g09d2