Use strtok instead of strtok_r

This commit is contained in:
mazmazz 2019-08-07 01:29:05 -04:00
parent 3add792986
commit 688fdf35f9
1 changed files with 5 additions and 1 deletions

View File

@ -163,7 +163,10 @@ static void MidiSoundfontPath_Onchange(void)
boolean proceed = true;
// check if file exists; menu calls this method at every keystroke
while ((miditoken = strtok_r(source, ";", &source)))
// get first token
miditoken = strtok(source, ";");
while (miditoken != NULL)
{
SDL_RWops *rw = SDL_RWFromFile(miditoken, "r");
if (rw != NULL)
@ -173,6 +176,7 @@ static void MidiSoundfontPath_Onchange(void)
proceed = false;
break;
}
miditoken = strtok(NULL, ";");
}
free(source);