summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/Win32CORE/Win32CORE.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/Win32CORE/Win32CORE.c b/ext/Win32CORE/Win32CORE.c
index 8a56c3e21a..aacbf63025 100644
--- a/ext/Win32CORE/Win32CORE.c
+++ b/ext/Win32CORE/Win32CORE.c
@@ -15,7 +15,9 @@ static void
forward(pTHX_ const char *function)
{
dXSARGS;
+ DWORD err = GetLastError();
Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpvn("Win32",5), newSVnv(0.27));
+ SetLastError(err);
SPAGAIN;
PUSHMARK(SP-items);
call_pv(function, GIMME_V);