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
87ef00fc
Commit
87ef00fc
authored
Jan 07, 2013
by
Rico Schüller
Committed by
Alexandre Julliard
Jan 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Use sizeof variable, not type.
parent
6cb43010
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
shader.c
dlls/d3dx9_36/shader.c
+5
-5
No files found.
dlls/d3dx9_36/shader.c
View file @
87ef00fc
...
@@ -1625,8 +1625,8 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags,
...
@@ -1625,8 +1625,8 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags,
HRESULT
hr
;
HRESULT
hr
;
LPCVOID
data
;
LPCVOID
data
;
UINT
size
;
UINT
size
;
const
D3DXSHADER_CONSTANTTABLE
*
ctab_header
;
const
D3DXSHADER_CONSTANTTABLE
*
ctab_header
;
D3DXSHADER_CONSTANTINFO
*
constant_info
;
D3DXSHADER_CONSTANTINFO
*
constant_info
;
DWORD
i
;
DWORD
i
;
TRACE
(
"byte_code %p, flags %x, constant_table %p
\n
"
,
byte_code
,
flags
,
constant_table
);
TRACE
(
"byte_code %p, flags %x, constant_table %p
\n
"
,
byte_code
,
flags
,
constant_table
);
...
@@ -1654,14 +1654,14 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags,
...
@@ -1654,14 +1654,14 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags,
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
}
}
if
(
size
<
sizeof
(
D3DXSHADER_CONSTANTTABLE
))
if
(
size
<
sizeof
(
*
ctab_header
))
{
{
WARN
(
"Invalid CTAB size.
\n
"
);
WARN
(
"Invalid CTAB size.
\n
"
);
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
}
}
ctab_header
=
(
const
D3DXSHADER_CONSTANTTABLE
*
)
data
;
ctab_header
=
(
const
D3DXSHADER_CONSTANTTABLE
*
)
data
;
if
(
ctab_header
->
Size
!=
sizeof
(
D3DXSHADER_CONSTANTTABLE
))
if
(
ctab_header
->
Size
!=
sizeof
(
*
ctab_header
))
{
{
WARN
(
"Invalid D3DXSHADER_CONSTANTTABLE size.
\n
"
);
WARN
(
"Invalid D3DXSHADER_CONSTANTTABLE size.
\n
"
);
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
...
@@ -1750,7 +1750,7 @@ HRESULT WINAPI D3DXGetShaderSamplers(CONST DWORD *byte_code, LPCSTR *samplers, U
...
@@ -1750,7 +1750,7 @@ HRESULT WINAPI D3DXGetShaderSamplers(CONST DWORD *byte_code, LPCSTR *samplers, U
hr
=
D3DXFindShaderComment
(
byte_code
,
MAKEFOURCC
(
'C'
,
'T'
,
'A'
,
'B'
),
(
LPCVOID
*
)
&
data
,
&
size
);
hr
=
D3DXFindShaderComment
(
byte_code
,
MAKEFOURCC
(
'C'
,
'T'
,
'A'
,
'B'
),
(
LPCVOID
*
)
&
data
,
&
size
);
if
(
hr
!=
D3D_OK
)
return
D3D_OK
;
if
(
hr
!=
D3D_OK
)
return
D3D_OK
;
if
(
size
<
sizeof
(
D3DXSHADER_CONSTANTTABLE
))
return
D3D_OK
;
if
(
size
<
sizeof
(
*
ctab_header
))
return
D3D_OK
;
ctab_header
=
(
const
D3DXSHADER_CONSTANTTABLE
*
)
data
;
ctab_header
=
(
const
D3DXSHADER_CONSTANTTABLE
*
)
data
;
if
(
ctab_header
->
Size
!=
sizeof
(
*
ctab_header
))
return
D3D_OK
;
if
(
ctab_header
->
Size
!=
sizeof
(
*
ctab_header
))
return
D3D_OK
;
...
...
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