Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
42f9a8ef
Commit
42f9a8ef
authored
Aug 24, 2022
by
Brendan Shanks
Committed by
Alexandre Julliard
Aug 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Return NULL from ExtractIcon() for all error cases.
parent
584eb4e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
shell32_main.c
dlls/shell32/shell32_main.c
+4
-7
shelllink.c
dlls/shell32/tests/shelllink.c
+0
-7
No files found.
dlls/shell32/shell32_main.c
View file @
42f9a8ef
...
...
@@ -606,16 +606,13 @@ HICON WINAPI ExtractIconW(HINSTANCE hInstance, LPCWSTR lpszFile, UINT nIconIndex
ret
=
PrivateExtractIconsW
(
lpszFile
,
0
,
cx
,
cy
,
NULL
,
NULL
,
0
,
LR_DEFAULTCOLOR
);
if
(
ret
!=
(
UINT
)
-
1
&&
ret
)
return
(
HICON
)(
UINT_PTR
)
ret
;
return
NULL
;
}
else
{
ret
=
PrivateExtractIconsW
(
lpszFile
,
nIconIndex
,
cx
,
cy
,
&
hIcon
,
NULL
,
1
,
LR_DEFAULTCOLOR
);
if
(
ret
==
(
UINT
)
-
1
)
return
(
HICON
)
1
;
else
if
(
ret
>
0
&&
hIcon
)
return
hIcon
;
if
(
ret
>
0
&&
hIcon
)
return
hIcon
;
}
return
NULL
;
}
...
...
dlls/shell32/tests/shelllink.c
View file @
42f9a8ef
...
...
@@ -1185,7 +1185,6 @@ static void test_ExtractIcon(void)
/* specified instance handle */
hicon
=
ExtractIconA
(
GetModuleHandleA
(
"shell32.dll"
),
NULL
,
0
);
todo_wine
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
hicon2
=
ExtractIconA
(
GetModuleHandleA
(
"shell32.dll"
),
"shell32.dll"
,
-
1
);
ok
(
hicon2
!=
NULL
,
"Got icon %p
\n
"
,
hicon2
);
...
...
@@ -1211,14 +1210,12 @@ static void test_ExtractIcon(void)
CloseHandle
(
file
);
hicon
=
ExtractIconA
(
NULL
,
path
,
0
);
todo_wine
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
hicon
=
ExtractIconA
(
NULL
,
path
,
-
1
);
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
hicon
=
ExtractIconA
(
NULL
,
path
,
1
);
todo_wine
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
r
=
DeleteFileA
(
path
);
...
...
@@ -1229,7 +1226,6 @@ static void test_ExtractIcon(void)
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
hicon
=
ExtractIconA
(
NULL
,
""
,
0
);
todo_wine
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
/* same for W variant */
...
...
@@ -1267,14 +1263,12 @@ if (0)
CloseHandle
(
file
);
hicon
=
ExtractIconW
(
NULL
,
pathW
,
0
);
todo_wine
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
hicon
=
ExtractIconW
(
NULL
,
pathW
,
-
1
);
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
hicon
=
ExtractIconW
(
NULL
,
pathW
,
1
);
todo_wine
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
r
=
DeleteFileW
(
pathW
);
...
...
@@ -1285,7 +1279,6 @@ if (0)
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
hicon
=
ExtractIconW
(
NULL
,
emptyW
,
0
);
todo_wine
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment