From 688fdf35f9f12da054c255c51e203cd42ea8afc8 Mon Sep 17 00:00:00 2001
From: mazmazz <mar.marcoz@outlook.com>
Date: Wed, 7 Aug 2019 01:29:05 -0400
Subject: [PATCH] Use strtok instead of strtok_r

---
 src/sdl/mixer_sound.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c
index 64b7cc722f..d94010d9ad 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);
-- 
GitLab