Skip to content

Commit

Permalink
Fix error "ERROR in finalizer: wrong number of arguments for function…
Browse files Browse the repository at this point in the history
… call" on closing

Luajit started printing these errors in their commit 1c27912 instead of
throwing them. The char **err argument is needed because all of the
impl's functions are wrapped with ffi_util.err_arg_to_multiple_return in
lfs.moon.
  • Loading branch information
arch1t3cht committed Jan 12, 2025
1 parent 4d823c4 commit 0f12807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libaegisub/lua/modules/lfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ char *dir_next(DirectoryIterator &it, char **err) {
});
}

void dir_close(DirectoryIterator &it) {
void dir_close(DirectoryIterator &it, char **err) {
it = DirectoryIterator();
}

void dir_free(DirectoryIterator *it) {
void dir_free(DirectoryIterator *it, char **err) {
delete it;
}

Expand Down

0 comments on commit 0f12807

Please sign in to comment.