summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/locale/setrunelocale.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
index ec35b6575a68..a42c02086836 100644
--- a/lib/libc/locale/setrunelocale.c
+++ b/lib/libc/locale/setrunelocale.c
@@ -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'))) ||