summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-lua.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-08-03 15:51:49 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:55 +0100
commit5e3f2864f8dc0c97511bf665cb61914fcf945be5 (patch)
treefeee18baa9fff0e07d04728d6f6a4675e333debf /ctl-lib/ctl-lua.c
parent559f25af7a412a54ee0675877c6a82c3bb36cbe2 (diff)
Fix wrong computed length
Change-Id: I020a1619c94a3a22d66e6657f64d4cedda3a1e62 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-lua.c')
-rw-r--r--ctl-lib/ctl-lua.c4
1 files 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++;