Merge branch 'musicplus-strtok' into 'master'

Use strtok instead of strtok_r

See merge request STJr/SRB2Internal!286
This commit is contained in:
MascaraSnake 2019-08-07 14:34:25 -04:00
commit 088f39adbd

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);