13
0

strtok() is the root of all evil.

This commit is contained in:
Robin Gareus 2014-06-14 16:45:55 +02:00
parent 62ba8d23e3
commit f7acad4e5c

View File

@ -152,8 +152,8 @@ void* vstfx_load_vst_library(const char* path)
len2 = strlen(path); len2 = strlen(path);
/*Try all the possibilities in the path - deliminated by : */ /*Try all the possibilities in the path - deliminated by : */
char *saveptr;
lxvst_path = strtok (envdup, ":"); lxvst_path = strtok_r (envdup, ":", &saveptr);
while (lxvst_path != 0) while (lxvst_path != 0)
{ {
@ -177,7 +177,7 @@ void* vstfx_load_vst_library(const char* path)
/*Try again*/ /*Try again*/
lxvst_path = strtok (0, ":"); lxvst_path = strtok_r (0, ":", &saveptr);
} }
/*Free the path*/ /*Free the path*/