diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c index d9a651fb1044..501dd6bd7355 100644 --- a/lib/libc/nls/msgcat.c +++ b/lib/libc/nls/msgcat.c @@ -91,7 +91,7 @@ int type; lang = setlocale(LC_MESSAGES, NULL); else lang = getenv("LANG"); - if (lang == NULL || strchr(lang, '/') != NULL) + if (lang == NULL || !*lang || strchr(lang, '/') != NULL) lang = "C"; if ((nlspath = (char *) getenv("NLSPATH")) == NULL #ifndef __NETBSD_SYSCALLS