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
21525261
Commit
21525261
authored
May 16, 2013
by
Christian Costa
Committed by
Alexandre Julliard
May 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Fix IDirectXFileDataImpl_GetName and IDirectXFileDataReferenceImpl_GetName + tests.
parent
635f76b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
d3dxof.c
dlls/d3dxof/d3dxof.c
+6
-0
d3dxof.c
dlls/d3dxof/tests/d3dxof.c
+8
-0
No files found.
dlls/d3dxof/d3dxof.c
View file @
21525261
...
...
@@ -587,6 +587,9 @@ static HRESULT WINAPI IDirectXFileDataImpl_GetName(IDirectXFileData* iface, LPST
if
(
*
pdwBufLen
<
len
)
return
DXFILEERR_BADVALUE
;
CopyMemory
(
pstrNameBuf
,
This
->
pobj
->
name
,
len
);
/* Even if we return a size of 0, an empty string with a null byte must be returned */
if
(
*
pdwBufLen
&&
!
len
)
pstrNameBuf
[
0
]
=
0
;
}
*
pdwBufLen
=
len
;
...
...
@@ -851,6 +854,9 @@ static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetName(IDirectXFileDataRefe
if
(
*
pdwBufLen
<
len
)
return
DXFILEERR_BADVALUE
;
CopyMemory
(
pstrNameBuf
,
This
->
ptarget
->
name
,
len
);
/* Even if we return a size of 0, an empty string with a null byte must be returned */
if
(
*
pdwBufLen
&&
!
len
)
pstrNameBuf
[
0
]
=
0
;
}
*
pdwBufLen
=
len
;
...
...
dlls/d3dxof/tests/d3dxof.c
View file @
21525261
...
...
@@ -546,10 +546,18 @@ static void test_getname(void)
hr
=
IDirectXFileData_GetName
(
lpdxfd
,
NULL
,
&
length
);
ok
(
hr
==
DXFILE_OK
,
"IDirectXFileData_GetName: %x
\n
"
,
hr
);
ok
(
length
==
0
,
"Returned length should be 0 instead of %u
\n
"
,
length
);
length
=
0
;
name
[
0
]
=
0x7f
;
hr
=
IDirectXFileData_GetName
(
lpdxfd
,
name
,
&
length
);
ok
(
hr
==
DXFILE_OK
,
"IDirectXFileData_GetName: %x
\n
"
,
hr
);
ok
(
length
==
0
,
"Returned length should be 0 instead of %u
\n
"
,
length
);
ok
(
name
[
0
]
==
0x7f
,
"First character is %#x instead of 0x7f
\n
"
,
name
[
0
]);
length
=
sizeof
(
name
);
name
[
0
]
=
0x7f
;
hr
=
IDirectXFileData_GetName
(
lpdxfd
,
name
,
&
length
);
ok
(
hr
==
DXFILE_OK
,
"IDirectXFileData_GetName: %x
\n
"
,
hr
);
ok
(
length
==
0
,
"Returned length should be 0 instead of %u
\n
"
,
length
);
ok
(
name
[
0
]
==
0
,
"First character is %#x instead of 0x00
\n
"
,
name
[
0
]);
ref
=
IDirectXFileEnumObject_Release
(
lpdxfeo
);
ok
(
ref
==
0
,
"Got refcount %d, expected 0
\n
"
,
ref
);
...
...
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