diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c
index 64b7cc722ff03b4525788e76e2218e7814e35172..d94010d9add02dcc47693b9149f5b7fc177b148d 100644
--- a/src/sdl/mixer_sound.c
+++ b/src/sdl/mixer_sound.c
@@ -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);