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
317ad649
Commit
317ad649
authored
Jan 19, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: LCMapString should include the terminating NULL also for LCMAP_SORTKEY.
parent
6d75522f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
locale.c
dlls/kernel32/locale.c
+4
-0
locale.c
dlls/kernel32/tests/locale.c
+3
-1
No files found.
dlls/kernel32/locale.c
View file @
317ad649
...
...
@@ -2371,6 +2371,8 @@ INT WINAPI LCMapStringW(LCID lcid, DWORD flags, LPCWSTR src, INT srclen,
ret
=
wine_get_sortkey
(
flags
,
src
,
srclen
,
(
char
*
)
dst
,
dstlen
);
if
(
ret
==
0
)
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
ret
++
;
return
ret
;
}
...
...
@@ -2510,6 +2512,8 @@ INT WINAPI LCMapStringA(LCID lcid, DWORD flags, LPCSTR src, INT srclen,
ret
=
wine_get_sortkey
(
flags
,
srcW
,
srclenW
,
dst
,
dstlen
);
if
(
ret
==
0
)
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
ret
++
;
goto
map_string_exit
;
}
...
...
dlls/kernel32/tests/locale.c
View file @
317ad649
...
...
@@ -1227,9 +1227,11 @@ static void test_LCMapStringA(void)
ret
=
LCMapStringA
(
LOCALE_USER_DEFAULT
,
LCMAP_SORTKEY
,
upper_case
,
-
1
,
buf
,
sizeof
(
buf
));
ok
(
ret
,
"LCMapStringA must succeed
\n
"
);
ok
(
buf
[
ret
-
1
]
==
0
,
"LCMapStringA not null-terminated
\n
"
);
ret2
=
LCMapStringA
(
LOCALE_USER_DEFAULT
,
LCMAP_SORTKEY
,
upper_case
,
lstrlenA
(
upper_case
),
buf2
,
sizeof
(
buf2
));
ok
(
ret
,
"LCMapStringA must succeed
\n
"
);
ok
(
ret2
,
"LCMapStringA must succeed
\n
"
);
ok
(
buf2
[
ret2
-
1
]
==
0
,
"LCMapStringA not null-terminated
\n
"
);
ok
(
ret
==
ret2
,
"lengths of sort keys must be equal
\n
"
);
ok
(
!
lstrcmpA
(
buf
,
buf2
),
"sort keys must be equal
\n
"
);
...
...
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