From 7c871f0ce420dd01a0f1b391e2a0122f728391b0 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 17 Oct 2005 08:56:41 +0000 Subject: [PATCH] Ignore empty environment strings. --- dlls/kernel/locale.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/kernel/locale.c b/dlls/kernel/locale.c index 3a3df32c174..37f78bf1647 100644 --- a/dlls/kernel/locale.c +++ b/dlls/kernel/locale.c @@ -505,9 +505,9 @@ static LCID get_env_lcid( UINT *unix_cp, const char *env_str ) char *buf, *lang,*country,*charset,*dialect,*next; LCID ret = 0; - if ((lang = getenv( "LC_ALL" )) || - (env_str && (lang = getenv( env_str ))) || - (lang = getenv( "LANG" ))) + if (((lang = getenv( "LC_ALL" )) && *lang) || + (env_str && (lang = getenv( env_str )) && *lang) || + ((lang = getenv( "LANG" )) && *lang)) { if (!strcmp(lang,"POSIX") || !strcmp(lang,"C")) goto done;