Ignore empty environment strings.

This commit is contained in:
Alexandre Julliard 2005-10-17 08:56:41 +00:00
parent 93d23a1568
commit 7c871f0ce4
1 changed files with 3 additions and 3 deletions

View File

@ -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;