winex11.drv: Remove order-of-evaluation dependencies
Andrew Talbot
andrew.talbot at talbotville.com
Thu Mar 19 17:40:14 CDT 2009
Variables tm and lf must be initialized before their values are used.
-- Andy.
---
Changelog:
winex11.drv: Remove order-of-evaluation dependencies.
diff --git a/dlls/winex11.drv/xfont.c b/dlls/winex11.drv/xfont.c
index 16409c5..3446466 100644
--- a/dlls/winex11.drv/xfont.c
+++ b/dlls/winex11.drv/xfont.c
@@ -3318,11 +3318,11 @@ BOOL CDECL X11DRV_EnumDeviceFonts( X11DRV_PDEVICE *physDev, LPLOGFONTW plf,
/* Note: XFONT_GetFontMetric() will have to
release the crit section, font list will
have to be retraversed on return */
-
if(plf->lfCharSet == DEFAULT_CHARSET ||
plf->lfCharSet == pfi->df.dfCharSet) {
- if( (b = (*proc)( &lf.elfLogFont, (TEXTMETRICW *)&tm,
- XFONT_GetFontMetric( pfi, &lf, &tm ), lp )) )
+ UINT xfm = XFONT_GetFontMetric( pfi, &lf, &tm );
+
+ if( (b = (*proc)( &lf.elfLogFont, (TEXTMETRICW *)&tm, xfm, lp )) )
bRet = b;
else break;
}
@@ -3334,8 +3334,9 @@ BOOL CDECL X11DRV_EnumDeviceFonts( X11DRV_PDEVICE *physDev, LPLOGFONTW plf,
{
if(pfr->fi)
{
- if( (b = (*proc)( &lf.elfLogFont, (TEXTMETRICW *)&tm,
- XFONT_GetFontMetric( pfr->fi, &lf, &tm ), lp )) )
+ UINT xfm = XFONT_GetFontMetric( pfr->fi, &lf, &tm );
+
+ if( (b = (*proc)( &lf.elfLogFont, (TEXTMETRICW *)&tm, xfm, lp )) )
bRet = b;
else break;
}
More information about the wine-patches
mailing list