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
79a65678
Commit
79a65678
authored
Mar 10, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/reader: Fix position methods return values in closed reader state.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
62a41d03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
reader.c
dlls/xmllite/reader.c
+2
-2
reader.c
dlls/xmllite/tests/reader.c
+4
-2
No files found.
dlls/xmllite/reader.c
View file @
79a65678
...
...
@@ -3320,7 +3320,7 @@ static HRESULT WINAPI xmlreader_GetLineNumber(IXmlReader* iface, UINT *line_numb
break
;
}
return
S_OK
;
return
This
->
state
==
XmlReadState_Closed
?
S_FALSE
:
S_OK
;
}
static
HRESULT
WINAPI
xmlreader_GetLinePosition
(
IXmlReader
*
iface
,
UINT
*
line_position
)
...
...
@@ -3355,7 +3355,7 @@ static HRESULT WINAPI xmlreader_GetLinePosition(IXmlReader* iface, UINT *line_po
break
;
}
return
S_OK
;
return
This
->
state
==
XmlReadState_Closed
?
S_FALSE
:
S_OK
;
}
static
HRESULT
WINAPI
xmlreader_GetAttributeCount
(
IXmlReader
*
iface
,
UINT
*
count
)
...
...
dlls/xmllite/tests/reader.c
View file @
79a65678
...
...
@@ -2484,6 +2484,8 @@ static void test_reader_position(void)
hr
=
CreateXmlReader
(
&
IID_IXmlReader
,
(
void
**
)
&
reader
,
NULL
);
ok
(
hr
==
S_OK
,
"S_OK, got %08x
\n
"
,
hr
);
TEST_READER_STATE
(
reader
,
XmlReadState_Closed
);
/* position methods with Null args */
hr
=
IXmlReader_GetLineNumber
(
reader
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
hr
);
...
...
@@ -2493,13 +2495,11 @@ static void test_reader_position(void)
position
=
123
;
hr
=
IXmlReader_GetLinePosition
(
reader
,
&
position
);
todo_wine
ok
(
hr
==
S_FALSE
,
"got %#x
\n
"
,
hr
);
ok
(
position
==
0
,
"got %u
\n
"
,
position
);
position
=
123
;
hr
=
IXmlReader_GetLineNumber
(
reader
,
&
position
);
todo_wine
ok
(
hr
==
S_FALSE
,
"got %#x
\n
"
,
hr
);
ok
(
position
==
0
,
"got %u
\n
"
,
position
);
...
...
@@ -2508,6 +2508,7 @@ todo_wine
hr
=
IXmlReader_SetInput
(
reader
,
(
IUnknown
*
)
stream
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
TEST_READER_STATE
(
reader
,
XmlReadState_Initial
);
TEST_READER_POSITION
(
reader
,
0
,
0
);
hr
=
IXmlReader_Read
(
reader
,
&
type
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
@@ -2532,6 +2533,7 @@ todo_wine
TEST_READER_POSITION2
(
reader
,
1
,
37
,
~
0u
,
40
);
IXmlReader_SetInput
(
reader
,
NULL
);
TEST_READER_STATE2
(
reader
,
XmlReadState_Initial
,
XmlReadState_Closed
);
TEST_READER_POSITION
(
reader
,
0
,
0
);
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