kernel32: Zero is an invalid flag value.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
70a6546753
commit
5fbdd644d6
|
@ -3154,7 +3154,8 @@ INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPW
|
||||||
if ((flags & (LCMAP_LOWERCASE | LCMAP_UPPERCASE)) == (LCMAP_LOWERCASE | LCMAP_UPPERCASE) ||
|
if ((flags & (LCMAP_LOWERCASE | LCMAP_UPPERCASE)) == (LCMAP_LOWERCASE | LCMAP_UPPERCASE) ||
|
||||||
(flags & (LCMAP_HIRAGANA | LCMAP_KATAKANA)) == (LCMAP_HIRAGANA | LCMAP_KATAKANA) ||
|
(flags & (LCMAP_HIRAGANA | LCMAP_KATAKANA)) == (LCMAP_HIRAGANA | LCMAP_KATAKANA) ||
|
||||||
(flags & (LCMAP_HALFWIDTH | LCMAP_FULLWIDTH)) == (LCMAP_HALFWIDTH | LCMAP_FULLWIDTH) ||
|
(flags & (LCMAP_HALFWIDTH | LCMAP_FULLWIDTH)) == (LCMAP_HALFWIDTH | LCMAP_FULLWIDTH) ||
|
||||||
(flags & (LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE)) == (LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE))
|
(flags & (LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE)) == (LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE) ||
|
||||||
|
!flags)
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_INVALID_FLAGS);
|
SetLastError(ERROR_INVALID_FLAGS);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -2196,6 +2196,7 @@ static void test_CompareStringEx(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const DWORD lcmap_invalid_flags[] = {
|
static const DWORD lcmap_invalid_flags[] = {
|
||||||
|
0,
|
||||||
LCMAP_HIRAGANA | LCMAP_KATAKANA,
|
LCMAP_HIRAGANA | LCMAP_KATAKANA,
|
||||||
LCMAP_HALFWIDTH | LCMAP_FULLWIDTH,
|
LCMAP_HALFWIDTH | LCMAP_FULLWIDTH,
|
||||||
LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE,
|
LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE,
|
||||||
|
|
Loading…
Reference in New Issue