Commit 8a390c86 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

gdi32: Avoid uninitialized variable use in EnumEnhMetaFile (MSVC).

parent 966c5dff
......@@ -2288,6 +2288,7 @@ BOOL WINAPI EnumEnhMetaFile(
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
info->state.mode = MM_TEXT;
info->state.wndOrgX = 0;
info->state.wndOrgY = 0;
info->state.wndExtX = 1;
......@@ -2338,9 +2339,6 @@ BOOL WINAPI EnumEnhMetaFile(
old_arcdir = SetArcDirection(hdc, AD_COUNTERCLOCKWISE);
old_polyfill = SetPolyFillMode(hdc, ALTERNATE);
old_stretchblt = SetStretchBltMode(hdc, BLACKONWHITE);
}
info->state.mode = MM_TEXT;
if ( IS_WIN9X() )
{
......@@ -2397,13 +2395,14 @@ BOOL WINAPI EnumEnhMetaFile(
}
/* WinNT resets the current vp/win org/ext */
if ( !IS_WIN9X() && hdc )
if ( !IS_WIN9X() )
{
SetMapMode(hdc, MM_TEXT);
SetWindowOrgEx(hdc, 0, 0, NULL);
SetViewportOrgEx(hdc, 0, 0, NULL);
EMF_Update_MF_Xform(hdc, info);
}
}
ret = TRUE;
offset = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment