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
3fe5f25b
Commit
3fe5f25b
authored
Mar 07, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/reader: Fix prefix returned after moving back to element.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
70028b7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
reader.c
dlls/xmllite/reader.c
+2
-0
reader.c
dlls/xmllite/tests/reader.c
+11
-0
No files found.
dlls/xmllite/reader.c
View file @
3fe5f25b
...
...
@@ -2890,12 +2890,14 @@ static HRESULT WINAPI xmlreader_MoveToElement(IXmlReader* iface)
/* FIXME: support other node types with 'attributes' like DTD */
if
(
This
->
is_empty_element
)
{
reader_set_strvalue
(
This
,
StringValue_Prefix
,
&
This
->
empty_element
.
prefix
);
reader_set_strvalue
(
This
,
StringValue_LocalName
,
&
This
->
empty_element
.
localname
);
reader_set_strvalue
(
This
,
StringValue_QualifiedName
,
&
This
->
empty_element
.
qname
);
}
else
{
struct
element
*
element
=
LIST_ENTRY
(
list_head
(
&
This
->
elements
),
struct
element
,
entry
);
if
(
element
)
{
reader_set_strvalue
(
This
,
StringValue_Prefix
,
&
element
->
prefix
);
reader_set_strvalue
(
This
,
StringValue_LocalName
,
&
element
->
localname
);
reader_set_strvalue
(
This
,
StringValue_QualifiedName
,
&
element
->
qname
);
}
...
...
dlls/xmllite/tests/reader.c
View file @
3fe5f25b
...
...
@@ -2034,6 +2034,17 @@ static void test_prefix(void)
wine_dbgstr_w
(
expected
));
free_str
(
expected
);
/* back to the element, check prefix */
hr
=
IXmlReader_MoveToElement
(
reader
);
ok
(
hr
==
S_OK
,
"MoveToElement() failed, %#x.
\n
"
,
hr
);
expected
=
a2w
(
prefix_tests
[
i
].
prefix1
);
hr
=
IXmlReader_GetPrefix
(
reader
,
&
prefix
,
NULL
);
ok
(
hr
==
S_OK
,
"GetPrefix() failed, %#x.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
prefix
,
expected
),
"Unexpected prefix %s, expected %s.
\n
"
,
wine_dbgstr_w
(
prefix
),
wine_dbgstr_w
(
expected
));
free_str
(
expected
);
IStream_Release
(
stream
);
}
...
...
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