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
422d57e7
Commit
422d57e7
authored
Jun 08, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Jun 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Fix vertex index test and print a warning when it is out of range.
parent
e80d6199
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
meshbuilder.c
dlls/d3drm/meshbuilder.c
+4
-1
No files found.
dlls/d3drm/meshbuilder.c
View file @
422d57e7
...
...
@@ -1366,8 +1366,11 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData)
else
{
DWORD
vertex_idx
=
*
faces_vertex_idx_ptr
;
if
(
vertex_idx
>
This
->
nb_vertices
)
if
(
vertex_idx
>=
This
->
nb_vertices
)
{
WARN
(
"Found vertex index %u but only %u vertices available => use index 0
\n
"
,
vertex_idx
,
This
->
nb_vertices
);
vertex_idx
=
0
;
}
*
(
faces_data_ptr
+
faces_data_size
++
)
=
vertex_idx
;
/* Add face normal to vertex normal */
D3DRMVectorAdd
(
&
This
->
pNormals
[
vertex_idx
],
&
This
->
pNormals
[
vertex_idx
],
&
face_normal
);
...
...
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