mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
FFI: Fix GetLastError() save/restore around ffi.load().
This commit is contained in:
parent
c2dcf39ee3
commit
90c445851f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user