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
c8b6b2b1
Commit
c8b6b2b1
authored
Aug 08, 2007
by
Chris Robinson
Committed by
Alexandre Julliard
Aug 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use a safer, more compliant method to parse extension strings.
parent
7818cbda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
13 deletions
+25
-13
directx.c
dlls/wined3d/directx.c
+25
-13
No files found.
dlls/wined3d/directx.c
View file @
c8b6b2b1
...
...
@@ -627,14 +627,22 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
ERR
(
" GL_Extensions returns NULL
\n
"
);
}
else
{
while
(
*
GL_Extensions
!=
0x00
)
{
const
char
*
Start
=
GL_Extensions
;
const
char
*
Start
;
char
ThisExtn
[
256
];
size_t
len
;
memset
(
ThisExtn
,
0x00
,
sizeof
(
ThisExtn
));
while
(
*
GL_Extensions
!=
' '
&&
*
GL_Extensions
!=
0x00
)
{
while
(
isspace
(
*
GL_Extensions
))
GL_Extensions
++
;
Start
=
GL_Extensions
;
while
(
!
isspace
(
*
GL_Extensions
)
&&
*
GL_Extensions
!=
0x00
)
{
GL_Extensions
++
;
}
memcpy
(
ThisExtn
,
Start
,
(
GL_Extensions
-
Start
));
len
=
GL_Extensions
-
Start
;
if
(
len
==
0
||
len
>=
sizeof
(
ThisExtn
))
continue
;
memcpy
(
ThisExtn
,
Start
,
len
);
ThisExtn
[
len
]
=
'\0'
;
TRACE_
(
d3d_caps
)(
"- %s
\n
"
,
ThisExtn
);
for
(
i
=
0
;
i
<
(
sizeof
(
EXTENSION_MAP
)
/
sizeof
(
*
EXTENSION_MAP
));
++
i
)
{
...
...
@@ -644,8 +652,6 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
break
;
}
}
if
(
*
GL_Extensions
==
' '
)
GL_Extensions
++
;
}
if
(
gl_info
->
supported
[
APPLE_FENCE
])
{
...
...
@@ -998,22 +1004,28 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
ERR
(
" WGL_Extensions returns NULL
\n
"
);
}
else
{
while
(
*
WGL_Extensions
!=
0x00
)
{
const
char
*
Start
=
WGL_Extensions
;
const
char
*
Start
;
char
ThisExtn
[
256
];
size_t
len
;
memset
(
ThisExtn
,
0x00
,
sizeof
(
ThisExtn
));
while
(
*
WGL_Extensions
!=
' '
&&
*
WGL_Extensions
!=
0x00
)
{
while
(
isspace
(
*
WGL_Extensions
))
WGL_Extensions
++
;
Start
=
WGL_Extensions
;
while
(
!
isspace
(
*
WGL_Extensions
)
&&
*
WGL_Extensions
!=
0x00
)
{
WGL_Extensions
++
;
}
memcpy
(
ThisExtn
,
Start
,
(
WGL_Extensions
-
Start
));
len
=
WGL_Extensions
-
Start
;
if
(
len
==
0
||
len
>=
sizeof
(
ThisExtn
))
continue
;
memcpy
(
ThisExtn
,
Start
,
len
);
ThisExtn
[
len
]
=
'\0'
;
TRACE_
(
d3d_caps
)(
"- %s
\n
"
,
ThisExtn
);
if
(
strstr
(
ThisExtn
,
"WGL_ARB_pbuffer"
))
{
if
(
!
strcmp
(
ThisExtn
,
"WGL_ARB_pbuffer"
))
{
gl_info
->
supported
[
WGL_ARB_PBUFFER
]
=
TRUE
;
TRACE_
(
d3d_caps
)(
"FOUND: WGL_ARB_pbuffer support
\n
"
);
}
if
(
*
WGL_Extensions
==
' '
)
WGL_Extensions
++
;
}
}
}
...
...
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