Fix use of uninitialized variable in dlls/user32/static.c
Gerald Pfeifer
gerald at pfeifer.com
Wed Dec 30 01:51:13 CST 2009
On Wed, 30 Dec 2009, Gerald Pfeifer wrote:
> It looks like this was introduced by
> b96ab35cadc5c79825b65ca2c3e6f6a763388fb5
>
> Gerald
>
> ChangeLog:
> Avoid use of uninitialized variable in STATIC_LoadIconA().
And here the symmetric case for STATIC_LoadIconW.
Gerald
ChangeLog:
Avoid use of uninitialized variable in STATIC_LoadIconW().
diff --git a/dlls/user32/static.c b/dlls/user32/static.c
index c351689..4b49be3 100644
--- a/dlls/user32/static.c
+++ b/dlls/user32/static.c
@@ -299,6 +299,9 @@ static HICON STATIC_LoadIconW( HINSTANCE hInstance, LPCWSTR name, DWORD style )
if (!hicon) hicon = LoadCursorW( hInstance, name );
}
}
+ else
+ hicon = 0;
+
if (!hicon) hicon = LoadIconW( 0, name );
/* Windows doesn't try to load a standard cursor,
probably because most IDs for standard cursors conflict
More information about the wine-patches
mailing list