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
7a223656
Commit
7a223656
authored
Jul 17, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Improve bstr_from_xmlCharN implementation.
parent
bf263947
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
saxreader.c
dlls/msxml3/saxreader.c
+4
-7
No files found.
dlls/msxml3/saxreader.c
View file @
7a223656
...
...
@@ -158,7 +158,6 @@ static int namespacePop(saxlocator *locator)
static
BSTR
bstr_from_xmlCharN
(
const
xmlChar
*
buf
,
int
len
)
{
DWORD
dLen
;
LPWSTR
str
;
BSTR
bstr
;
if
(
!
buf
)
...
...
@@ -166,13 +165,11 @@ static BSTR bstr_from_xmlCharN(const xmlChar *buf, int len)
dLen
=
MultiByteToWideChar
(
CP_UTF8
,
0
,
(
LPCSTR
)
buf
,
len
,
NULL
,
0
);
if
(
len
!=
-
1
)
dLen
++
;
str
=
heap_alloc
(
dLen
*
sizeof
(
WCHAR
)
);
if
(
!
str
)
bstr
=
SysAllocStringLen
(
NULL
,
dLen
-
1
);
if
(
!
b
str
)
return
NULL
;
MultiByteToWideChar
(
CP_UTF8
,
0
,
(
LPCSTR
)
buf
,
len
,
str
,
dLen
);
if
(
len
!=
-
1
)
str
[
dLen
-
1
]
=
'\0'
;
bstr
=
SysAllocString
(
str
);
heap_free
(
str
);
MultiByteToWideChar
(
CP_UTF8
,
0
,
(
LPCSTR
)
buf
,
len
,
bstr
,
dLen
);
if
(
len
!=
-
1
)
bstr
[
dLen
-
1
]
=
'\0'
;
return
bstr
;
}
...
...
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