summaryrefslogtreecommitdiffstats
path: root/src/scripting
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-08-25 13:15:32 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-08-25 13:15:32 (EDT)
commitc0dde461aa23e95dacf6dbdb0a489e37c399fbf6 (patch)
tree82a5c67c73f105269192824f1a74106101bf8c8c /src/scripting
parent2931d9b2f5ba35ebda905f4594d82d1b8f124336 (diff)
downloadoverworld-rpg-c0dde461aa23e95dacf6dbdb0a489e37c399fbf6.zip
overworld-rpg-c0dde461aa23e95dacf6dbdb0a489e37c399fbf6.tar.gz
overworld-rpg-c0dde461aa23e95dacf6dbdb0a489e37c399fbf6.tar.bz2
src/scripting/ffi.c: Fix variable
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 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);