diff options
Diffstat (limited to 'src')
-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) | |||
185 | { | 185 | { |
186 | DWORD oldwerr = GetLastError(); | 186 | DWORD oldwerr = GetLastError(); |
187 | void *h = (void *)LoadLibraryA(clib_extname(L, name)); | 187 | void *h = (void *)LoadLibraryA(clib_extname(L, name)); |
188 | SetLastError(oldwerr); | ||
189 | if (!h) clib_error(L, "cannot load module " LUA_QS ": %s", name); | 188 | if (!h) clib_error(L, "cannot load module " LUA_QS ": %s", name); |
189 | SetLastError(oldwerr); | ||
190 | UNUSED(global); | 190 | UNUSED(global); |
191 | return h; | 191 | return h; |
192 | } | 192 | } |