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
b14a08f3
Commit
b14a08f3
authored
Feb 11, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Feb 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Return the correct length from GetAcceptLanguagesA.
parent
31ea1266
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
ordinal.c
dlls/shlwapi/ordinal.c
+12
-1
No files found.
dlls/shlwapi/ordinal.c
View file @
b14a08f3
...
...
@@ -526,6 +526,8 @@ HRESULT WINAPI GetAcceptLanguagesA( LPSTR langbuf, LPDWORD buflen)
DWORD
buflenW
,
convlen
;
HRESULT
retval
;
TRACE
(
"(%p, %p) *%p: %d
\n
"
,
langbuf
,
buflen
,
buflen
,
buflen
?
*
buflen
:
-
1
);
if
(
!
langbuf
||
!
buflen
||
!*
buflen
)
return
E_FAIL
;
buflenW
=
*
buflen
;
...
...
@@ -535,11 +537,20 @@ HRESULT WINAPI GetAcceptLanguagesA( LPSTR langbuf, LPDWORD buflen)
if
(
retval
==
S_OK
)
{
convlen
=
WideCharToMultiByte
(
CP_ACP
,
0
,
langbufW
,
-
1
,
langbuf
,
*
buflen
,
NULL
,
NULL
);
convlen
--
;
/* do not count the terminating 0 */
}
else
/* copy partial string anyway */
{
convlen
=
WideCharToMultiByte
(
CP_ACP
,
0
,
langbufW
,
*
buflen
,
langbuf
,
*
buflen
,
NULL
,
NULL
);
if
(
convlen
<
*
buflen
)
langbuf
[
convlen
]
=
0
;
if
(
convlen
<
*
buflen
)
{
langbuf
[
convlen
]
=
0
;
convlen
--
;
/* do not count the terminating 0 */
}
else
{
convlen
=
*
buflen
;
}
}
*
buflen
=
buflenW
?
convlen
:
0
;
...
...
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