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
008efda7
Commit
008efda7
authored
Jan 24, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Fix is_nil_element in binary mode.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3845cc10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
reader.c
dlls/webservices/reader.c
+22
-3
No files found.
dlls/webservices/reader.c
View file @
008efda7
...
...
@@ -6458,6 +6458,27 @@ static HRESULT end_mapping( struct reader *reader, WS_TYPE_MAPPING mapping )
}
}
static
BOOL
is_true_text
(
const
WS_XML_TEXT
*
text
)
{
switch
(
text
->
textType
)
{
case
WS_XML_TEXT_TYPE_UTF8
:
{
const
WS_XML_UTF8_TEXT
*
text_utf8
=
(
const
WS_XML_UTF8_TEXT
*
)
text
;
if
(
text_utf8
->
value
.
length
==
4
&&
!
memcmp
(
text_utf8
->
value
.
bytes
,
"true"
,
4
))
return
TRUE
;
return
FALSE
;
}
case
WS_XML_TEXT_TYPE_BOOL
:
{
const
WS_XML_BOOL_TEXT
*
text_bool
=
(
const
WS_XML_BOOL_TEXT
*
)
text
;
return
text_bool
->
value
;
}
default:
ERR
(
"unhandled text type %u
\n
"
,
text
->
textType
);
return
FALSE
;
}
}
static
HRESULT
is_nil_element
(
const
WS_XML_ELEMENT_NODE
*
elem
)
{
static
const
WS_XML_STRING
localname
=
{
3
,
(
BYTE
*
)
"nil"
};
...
...
@@ -6466,12 +6487,10 @@ static HRESULT is_nil_element( const WS_XML_ELEMENT_NODE *elem )
for
(
i
=
0
;
i
<
elem
->
attributeCount
;
i
++
)
{
const
WS_XML_UTF8_TEXT
*
text
=
(
WS_XML_UTF8_TEXT
*
)
elem
->
attributes
[
i
]
->
value
;
if
(
elem
->
attributes
[
i
]
->
isXmlNs
)
continue
;
if
(
WsXmlStringEquals
(
elem
->
attributes
[
i
]
->
localName
,
&
localname
,
NULL
)
==
S_OK
&&
WsXmlStringEquals
(
elem
->
attributes
[
i
]
->
ns
,
&
ns
,
NULL
)
==
S_OK
&&
text
->
value
.
length
==
4
&&
!
memcmp
(
text
->
value
.
bytes
,
"true"
,
4
))
return
TRUE
;
is_true_text
(
elem
->
attributes
[
i
]
->
value
))
return
TRUE
;
}
return
FALSE
;
}
...
...
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