Commit d7ca73ce authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

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.
parent ed9cd3ed
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment