From 3591e3d092c5df3c10248b621bb1613686fc2673 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 4 Aug 2019 10:28:10 +0100 Subject: [PATCH] Fix MIDI Soundfont code shadowing a global variable. --- src/sdl/mixer_sound.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index ff2b029a5..64b7cc722 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -158,14 +158,14 @@ static void MidiSoundfontPath_Onchange(void) if (stricmp(Mix_GetSoundFonts(), cv_midisoundfontpath.string)) { - char *token; + char *miditoken; char *source = strdup(cv_midisoundfontpath.string); boolean proceed = true; // check if file exists; menu calls this method at every keystroke - while ((token = strtok_r(source, ";", &source))) + while ((miditoken = strtok_r(source, ";", &source))) { - SDL_RWops *rw = SDL_RWFromFile(token, "r"); + SDL_RWops *rw = SDL_RWFromFile(miditoken, "r"); if (rw != NULL) SDL_RWclose(rw); else