diff options
author | Mike Pall <mike> | 2011-11-25 12:25:51 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2011-11-25 12:25:51 +0100 |
commit | 90c445851ffb697adc680c4ffd735d940536cfa5 (patch) | |
tree | 1135bd049b038210b1dd96607cc266d654f507ab | |
parent | c2dcf39ee3d113ce775e8e4c10f8f8ea4467f920 (diff) | |
download | luajit2-90c445851ffb697adc680c4ffd735d940536cfa5.tar.gz |
FFI: Fix GetLastError() save/restore around ffi.load().
-rw-r--r-- | src/lj_clib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_clib.c b/src/lj_clib.c index 937b1258..ff71346a 100644 --- a/src/lj_clib.c +++ b/src/lj_clib.c @@ -185,8 +185,8 @@ static void *clib_loadlib(lua_State *L, const char *name, int global) { DWORD oldwerr = GetLastError(); void *h = (void *)LoadLibraryA(clib_extname(L, name)); - SetLastError(oldwerr); if (!h) clib_error(L, "cannot load module " LUA_QS ": %s", name); + SetLastError(oldwerr); UNUSED(global); return h; } |