msvcrt: Fix testing zero-valued expression with bitwise and in find_best_locale_proc.

The check should be for all of the flags being set instead.
This commit is contained in:
Rob Shearman 2008-09-23 13:31:47 +01:00 committed by Alexandre Julliard
parent ed9cd3ede2
commit d7ca73ce80
1 changed files with 2 additions and 1 deletions

View File

@ -189,7 +189,8 @@ find_best_locale_proc(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LO
res->match_flags = flags;
res->found_lang_id = LangID;
}
if (flags & (FOUND_LANGUAGE & FOUND_COUNTRY & FOUND_CODEPAGE))
if ((flags & (FOUND_LANGUAGE | FOUND_COUNTRY | FOUND_CODEPAGE)) ==
(FOUND_LANGUAGE | FOUND_COUNTRY | FOUND_CODEPAGE))
{
TRACE(":found exact locale match\n");
return STOP_LOOKING;