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:
Akihiro Sagawa 2016-09-23 00:06:10 +09:00 committed by Alexandre Julliard
parent 70a6546753
commit 5fbdd644d6
2 changed files with 3 additions and 1 deletions

View File

@ -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) ||
(flags & (LCMAP_HIRAGANA | LCMAP_KATAKANA)) == (LCMAP_HIRAGANA | LCMAP_KATAKANA) ||
(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);
return 0;

View File

@ -2196,6 +2196,7 @@ static void test_CompareStringEx(void)
}
static const DWORD lcmap_invalid_flags[] = {
0,
LCMAP_HIRAGANA | LCMAP_KATAKANA,
LCMAP_HALFWIDTH | LCMAP_FULLWIDTH,
LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE,