diff options
author | P. J. McDermott <pj@pehjota.net> | 2023-02-24 22:15:52 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2023-02-24 22:41:57 (EST) |
commit | a9d7345e8ea6a9cabad8d8e421a5e2cf358005ed (patch) | |
tree | 3744e07889b577dd66c2ce06fe1daf9007290b79 /src | |
parent | 6333a37011368ce65b5804b0c698257559a6e41a (diff) | |
download | overworld-rpg-a9d7345e8ea6a9cabad8d8e421a5e2cf358005ed.zip overworld-rpg-a9d7345e8ea6a9cabad8d8e421a5e2cf358005ed.tar.gz overworld-rpg-a9d7345e8ea6a9cabad8d8e421a5e2cf358005ed.tar.bz2 |
ffi: Reset arg index on each Lua->C function call
Diffstat (limited to 'src')
-rw-r--r-- | src/scripting/ffi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/scripting/ffi.c b/src/scripting/ffi.c index 6a30a94..35ba6f2 100644 --- a/src/scripting/ffi.c +++ b/src/scripting/ffi.c @@ -149,6 +149,8 @@ ffi_handle_function(lua_State *l) { struct ffi_function *fn; + call_arg_index = 0; + fn = (struct ffi_function *) lua_touserdata(l, lua_upvalueindex(1)); fn->func(fn); |