Fix MIDI Soundfont code shadowing a global variable.

This commit is contained in:
toaster 2019-08-04 10:28:10 +01:00
parent a87e1b8aa6
commit 3591e3d092

View file

@ -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