From 78b3d68c796407a5ef7643cdf6493db4e0239db9 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Fri, 5 Sep 2008 13:10:49 +0000 Subject: [PATCH] fix the advapi32 crypt winetest crash svn path=/trunk/; revision=35959 --- reactos/lib/3rdparty/libwine/debug.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/lib/3rdparty/libwine/debug.c b/reactos/lib/3rdparty/libwine/debug.c index 4dff5eae48c..2ed8d942f42 100644 --- a/reactos/lib/3rdparty/libwine/debug.c +++ b/reactos/lib/3rdparty/libwine/debug.c @@ -184,6 +184,8 @@ static void debug_init(void) { char *wine_debug; DWORD dwLength; + /* GetEnvironmentVariableA will change LastError! */ + DWORD LastError = GetLastError(); if (nb_debug_options != -1) return; /* already initialized */ nb_debug_options = 0; @@ -199,6 +201,7 @@ static void debug_init(void) free(wine_debug); } } + SetLastError(LastError); } /* varargs wrapper for funcs.dbg_vprintf */