Module: wine Branch: master Commit: d7ca73ce80cf8478f21323cce44e252d7dced849 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d7ca73ce80cf8478f21323cce4...
Author: Rob Shearman robertshearman@gmail.com Date: Tue Sep 23 13:31:47 2008 +0100
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.
---
dlls/msvcrt/locale.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 6447436..350e057 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -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;