Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
3fdc28c7
Commit
3fdc28c7
authored
Aug 23, 2022
by
Ziqing Hui
Committed by
Alexandre Julliard
Aug 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx10: Return E_FAIL in D3DX10CreateEffectFromFile for NULL file name.
parent
d4ae51e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
compiler.c
dlls/d3dx10_43/compiler.c
+4
-1
d3dx10.c
dlls/d3dx10_43/tests/d3dx10.c
+2
-2
No files found.
dlls/d3dx10_43/compiler.c
View file @
3fdc28c7
...
@@ -107,6 +107,9 @@ HRESULT WINAPI D3DX10CreateEffectFromFileW(const WCHAR *filename, const D3D10_SH
...
@@ -107,6 +107,9 @@ HRESULT WINAPI D3DX10CreateEffectFromFileW(const WCHAR *filename, const D3D10_SH
debugstr_w
(
filename
),
defines
,
include
,
debugstr_a
(
profile
),
shader_flags
,
effect_flags
,
debugstr_w
(
filename
),
defines
,
include
,
debugstr_a
(
profile
),
shader_flags
,
effect_flags
,
device
,
effect_pool
,
pump
,
effect
,
errors
,
hresult
);
device
,
effect_pool
,
pump
,
effect
,
errors
,
hresult
);
if
(
!
filename
)
return
E_FAIL
;
if
(
pump
)
if
(
pump
)
FIXME
(
"Asynchronous mode is not supported.
\n
"
);
FIXME
(
"Asynchronous mode is not supported.
\n
"
);
...
@@ -139,7 +142,7 @@ HRESULT WINAPI D3DX10CreateEffectFromFileA(const char *filename, const D3D10_SHA
...
@@ -139,7 +142,7 @@ HRESULT WINAPI D3DX10CreateEffectFromFileA(const char *filename, const D3D10_SHA
device
,
effect_pool
,
pump
,
effect
,
errors
,
hresult
);
device
,
effect_pool
,
pump
,
effect
,
errors
,
hresult
);
if
(
!
filename
)
if
(
!
filename
)
return
E_
INVALIDARG
;
return
E_
FAIL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
NULL
,
0
);
if
(
!
(
filenameW
=
malloc
(
len
*
sizeof
(
*
filenameW
))))
if
(
!
(
filenameW
=
malloc
(
len
*
sizeof
(
*
filenameW
))))
...
...
dlls/d3dx10_43/tests/d3dx10.c
View file @
3fdc28c7
...
@@ -4054,7 +4054,7 @@ static void test_create_effect_from_file(void)
...
@@ -4054,7 +4054,7 @@ static void test_create_effect_from_file(void)
effect
=
(
ID3D10Effect
*
)
0xdeadbeef
;
effect
=
(
ID3D10Effect
*
)
0xdeadbeef
;
hr
=
D3DX10CreateEffectFromFileW
(
NULL
,
NULL
,
NULL
,
NULL
,
0x0
,
0x0
,
hr
=
D3DX10CreateEffectFromFileW
(
NULL
,
NULL
,
NULL
,
NULL
,
0x0
,
0x0
,
device
,
NULL
,
NULL
,
&
effect
,
&
errors
,
NULL
);
device
,
NULL
,
NULL
,
&
effect
,
&
errors
,
NULL
);
todo_wine
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
errors
==
(
ID3D10Blob
*
)
0xdeadbeef
,
"Got unexpected errors %p.
\n
"
,
errors
);
ok
(
errors
==
(
ID3D10Blob
*
)
0xdeadbeef
,
"Got unexpected errors %p.
\n
"
,
errors
);
ok
(
effect
==
(
ID3D10Effect
*
)
0xdeadbeef
,
"Got unexpected effect %p.
\n
"
,
effect
);
ok
(
effect
==
(
ID3D10Effect
*
)
0xdeadbeef
,
"Got unexpected effect %p.
\n
"
,
effect
);
...
@@ -4062,7 +4062,7 @@ static void test_create_effect_from_file(void)
...
@@ -4062,7 +4062,7 @@ static void test_create_effect_from_file(void)
effect
=
(
ID3D10Effect
*
)
0xdeadbeef
;
effect
=
(
ID3D10Effect
*
)
0xdeadbeef
;
hr
=
D3DX10CreateEffectFromFileA
(
NULL
,
NULL
,
NULL
,
NULL
,
0x0
,
0x0
,
hr
=
D3DX10CreateEffectFromFileA
(
NULL
,
NULL
,
NULL
,
NULL
,
0x0
,
0x0
,
device
,
NULL
,
NULL
,
&
effect
,
&
errors
,
NULL
);
device
,
NULL
,
NULL
,
&
effect
,
&
errors
,
NULL
);
todo_wine
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
errors
==
(
ID3D10Blob
*
)
0xdeadbeef
,
"Got unexpected errors %p.
\n
"
,
errors
);
ok
(
errors
==
(
ID3D10Blob
*
)
0xdeadbeef
,
"Got unexpected errors %p.
\n
"
,
errors
);
ok
(
effect
==
(
ID3D10Effect
*
)
0xdeadbeef
,
"Got unexpected effect %p.
\n
"
,
effect
);
ok
(
effect
==
(
ID3D10Effect
*
)
0xdeadbeef
,
"Got unexpected effect %p.
\n
"
,
effect
);
...
...
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