From f7acad4e5cd36bef416633307c459656bf30b573 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 14 Jun 2014 16:45:55 +0200 Subject: strtok() is the root of all evil. --- libs/ardour/linux_vst_support.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/ardour/linux_vst_support.cc') diff --git a/libs/ardour/linux_vst_support.cc b/libs/ardour/linux_vst_support.cc index 0d976d653b..bd1ed0d27e 100644 --- a/libs/ardour/linux_vst_support.cc +++ b/libs/ardour/linux_vst_support.cc @@ -152,8 +152,8 @@ void* vstfx_load_vst_library(const char* path) len2 = strlen(path); /*Try all the possibilities in the path - deliminated by : */ - - lxvst_path = strtok (envdup, ":"); + char *saveptr; + lxvst_path = strtok_r (envdup, ":", &saveptr); while (lxvst_path != 0) { @@ -177,7 +177,7 @@ void* vstfx_load_vst_library(const char* path) /*Try again*/ - lxvst_path = strtok (0, ":"); + lxvst_path = strtok_r (0, ":", &saveptr); } /*Free the path*/ -- cgit v1.2.3