From 5e3f2864f8dc0c97511bf665cb61914fcf945be5 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 3 Aug 2018 15:51:49 +0200 Subject: Fix wrong computed length Change-Id: I020a1619c94a3a22d66e6657f64d4cedda3a1e62 Signed-off-by: Romain Forlot --- ctl-lib/ctl-lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctl-lib/ctl-lua.c b/ctl-lib/ctl-lua.c index ecfd0f3..67ef21a 100644 --- a/ctl-lib/ctl-lua.c +++ b/ctl-lib/ctl-lua.c @@ -1327,11 +1327,11 @@ int LuaConfigLoad(AFB_ApiT apiHandle, const char *prefix) { // set package.path lua variable use the CONTROL_PLUGIN_PATH as it could // have to find external lua packages in those directories + spath = GetDefaultPluginSearchPath(apiHandle, prefix); base_len = strlen(LUA_PATH_VALUE); - spath_len = strlen(CONTROL_PLUGIN_PATH); + spath_len = strlen(spath); token_nb = spath_len ? 1:0; - spath = GetDefaultPluginSearchPath(apiHandle, prefix); sep = spath; while((sep = strchr(sep, ':')) != NULL) { token_nb++; -- cgit 1.2.3-korg