diff --git a/moo/mod/ffi.c b/moo/mod/ffi.c index 401c53a..98558ec 100644 --- a/moo/mod/ffi.c +++ b/moo/mod/ffi.c @@ -113,7 +113,7 @@ static moo_pfrc_t pf_open (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs) dc = dcNewCallVM (4096); /* TODO: right size? */ if (!dc) { - moo_seterrnum (moo, moo_syserr_to_errnum(errno)); + moo_seterrwithsyserr (moo, 0, errno); moo->vmprim.dl_close (moo, handle); goto softfail; }