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
7c5b40ed
Commit
7c5b40ed
authored
Feb 03, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90: Return required buffer size in _Strxfrm.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ae0ba3f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
locale.c
dlls/msvcp90/locale.c
+7
-4
No files found.
dlls/msvcp90/locale.c
View file @
7c5b40ed
...
...
@@ -12663,7 +12663,8 @@ int __cdecl _To_wide(const char *src, wchar_t *dst)
return
MultiByteToWideChar
(
CP_ACP
,
0
,
src
,
-
1
,
dst
,
MAX_PATH
);
}
size_t
__cdecl
_Strxfrm
(
char
*
dest
,
char
*
dest_end
,
const
char
*
src
,
const
char
*
src_end
,
_Collvec
*
coll
)
size_t
__cdecl
_Strxfrm
(
char
*
dest
,
char
*
dest_end
,
const
char
*
src
,
const
char
*
src_end
,
_Collvec
*
coll
)
{
size_t
dest_len
=
dest_end
-
dest
;
size_t
src_len
=
src_end
-
src
;
...
...
@@ -12691,12 +12692,14 @@ size_t __cdecl _Strxfrm(char *dest, char *dest_end, const char *src, const char
}
len
=
MultiByteToWideChar
(
cv
.
page
,
MB_ERR_INVALID_CHARS
,
src
,
src_len
,
NULL
,
0
);
if
(
!
len
)
return
0
;
if
(
!
len
)
return
INT_MAX
;
buf
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
if
(
!
buf
)
return
0
;
if
(
!
buf
)
return
INT_MAX
;
MultiByteToWideChar
(
cv
.
page
,
MB_ERR_INVALID_CHARS
,
src
,
src_len
,
buf
,
len
);
len
=
LCMapStringW
(
lcid
,
LCMAP_SORTKEY
,
buf
,
len
,
(
WCHAR
*
)
dest
,
dest_len
);
len
=
LCMapStringW
(
lcid
,
LCMAP_SORTKEY
,
buf
,
len
,
NULL
,
0
);
if
(
len
<=
dest_len
)
LCMapStringW
(
lcid
,
LCMAP_SORTKEY
,
buf
,
len
,
(
WCHAR
*
)
dest
,
dest_len
);
heap_free
(
buf
);
return
len
;
}
...
...
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