diff options
-rw-r--r-- | src/locale/__setlocalecat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/locale/__setlocalecat.c b/src/locale/__setlocalecat.c index f1e4bf07..a947dbff 100644 --- a/src/locale/__setlocalecat.c +++ b/src/locale/__setlocalecat.c @@ -16,9 +16,9 @@ static const char envvars[][12] = { int __setlocalecat(locale_t loc, int cat, const char *val) { if (!*val) { - (val = getenv("LC_ALL")) || - (val = getenv(envvars[cat])) || - (val = getenv("LANG")) || + (val = getenv("LC_ALL")) && *val || + (val = getenv(envvars[cat])) && *val || + (val = getenv("LANG")) && *val || (val = "C.UTF-8"); } |