diff options
-rw-r--r-- | src/scripting/ffi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scripting/ffi.c b/src/scripting/ffi.c index 9029b25..a7e9834 100644 --- a/src/scripting/ffi.c +++ b/src/scripting/ffi.c @@ -119,7 +119,7 @@ ffi_register_functions_in_namespace(lua_State *l, struct ffi_namespace *parent) lua_setfield(l, -1, ns->name); } } - for (fn = ns->fn_head; fn != NULL; fn = fn->next) { + for (fn = parent->fn_head; fn != NULL; fn = fn->next) { lua_pushlightuserdata(l, fn); lua_pushcclosure(l, &ffi_handle_function, 1); lua_setfield(l, -2, fn->name); |