i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit 14667d8304382bb766ddbab5c58c2c81bfe16b6c
parent 3009ab422d136b8aefda080f585e51cd8d93b7fd
Author: Ingo Bürk <admin@airblader.de>
Date:   Sun, 13 Aug 2017 17:25:25 +0200

Merge pull request #140 from bluetech/fix-locale-discovery

Change the locale discovery procedure to treat empty string same as unset
Diffstat:
Mi3lock.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/i3lock.c b/i3lock.c
@@ -977,11 +977,11 @@ int main(int argc, char *argv[]) {
         errx(EXIT_FAILURE, "Could not load keymap");
 
     const char *locale = getenv("LC_ALL");
-    if (!locale)
+    if (!locale || !*locale)
         locale = getenv("LC_CTYPE");
-    if (!locale)
+    if (!locale || !*locale)
         locale = getenv("LANG");
-    if (!locale) {
+    if (!locale || !*locale) {
         if (debug_mode)
             fprintf(stderr, "Can't detect your locale, fallback to C\n");
         locale = "C";