Make sure a cursor is always returned if one exists.

This commit is contained in:
Mike McCormack 2005-08-19 09:56:52 +00:00 committed by Alexandre Julliard
parent a5156dcf40
commit ad3a5ed5e4
1 changed files with 2 additions and 2 deletions

View File

@ -583,8 +583,8 @@ static int CURSORICON_FindBestCursor( LPVOID dir, fnGetCIEntry get_entry,
maxwidth = maxheight = 255;
for ( i = 0; get_entry( dir, i, &cx, &cy, &bits ); i++ )
{
if ((cx < maxwidth) && (cy < maxheight) &&
(bits == 1))
if (((cx < maxwidth) && (cy < maxheight) && (bits == 1)) ||
(bestEntry==-1))
{
bestEntry = i;
maxwidth = cx;