summaryrefslogtreecommitdiffstats
path: root/src/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripting')
-rw-r--r--src/scripting/ffi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scripting/ffi.c b/src/scripting/ffi.c
index a7e9834..785db37 100644
--- a/src/scripting/ffi.c
+++ b/src/scripting/ffi.c
@@ -116,7 +116,7 @@ ffi_register_functions_in_namespace(lua_State *l, struct ffi_namespace *parent)
if (parent == &root) {
lua_setglobal(l, ns->name);
} else {
- lua_setfield(l, -1, ns->name);
+ lua_setfield(l, -2, ns->name);
}
}
for (fn = parent->fn_head; fn != NULL; fn = fn->next) {