setlocale may return NULL, handle this case too by resetting to "C"
This commit is contained in:
parent
016de69d9e
commit
460b926285
|
@ -107,11 +107,9 @@ int type;
|
|||
} else {
|
||||
if (type == NL_CAT_LOCALE)
|
||||
lang = setlocale(LC_MESSAGES, NULL);
|
||||
else {
|
||||
if ((lang = (char *) getenv("LANG")) == NULL)
|
||||
lang = "C";
|
||||
}
|
||||
if (strchr(lang, '/') != NULL)
|
||||
else
|
||||
lang = getenv("LANG");
|
||||
if (lang == NULL || strchr(lang, '/') != NULL)
|
||||
lang = "C";
|
||||
if ((nlspath = (char *) getenv("NLSPATH")) == NULL
|
||||
#ifndef __NETBSD_SYSCALLS
|
||||
|
|
Loading…
Reference in New Issue