From 9adf7cd57030053f39c84fdcf3037c7184212e63 Mon Sep 17 00:00:00 2001 From: Vincent Bénony Date: Wed, 6 Jan 2016 10:01:09 +0100 Subject: IOS: Uses Common::String instead of plain C string --- audio/softsynth/fluidsynth.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'audio') diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp index 372a370db4..b776c04738 100644 --- a/audio/softsynth/fluidsynth.cpp +++ b/audio/softsynth/fluidsynth.cpp @@ -185,11 +185,9 @@ int MidiDriver_FluidSynth::open() { const char *soundfont = ConfMan.get("soundfont").c_str(); #ifdef IPHONE_OFFICIAL - char *soundfont_fullpath[PATH_MAX]; - const char *document_path = iOS7_getDocumentsDir(); - strcpy((char *) soundfont_fullpath, document_path); - strcat((char *) soundfont_fullpath, soundfont); - _soundFont = fluid_synth_sfload(_synth, (const char *) soundfont_fullpath, 1); + Common::String soundfont_fullpath = iOS7_getDocumentsDir(); + soundfont_fullpath += soundfont; + _soundFont = fluid_synth_sfload(_synth, soundfont_fullpath.c_str(), 1); #else _soundFont = fluid_synth_sfload(_synth, soundfont, 1); #endif -- cgit v1.2.3