Catch empty encoding name too

This commit is contained in:
Andrey A. Chernov 2002-08-03 17:09:21 +00:00
parent c005cd89e1
commit 2f6754febb

View File

@ -61,7 +61,7 @@ setrunelocale(encoding)
char name[PATH_MAX];
_RuneLocale *rl;
if (!encoding || strlen(encoding) > ENCODING_LEN ||
if (!encoding || !*encoding || strlen(encoding) > ENCODING_LEN ||
(encoding[0] == '.' &&
(encoding[1] == '\0' ||
(encoding[1] == '.' && encoding[2] == '\0'))) ||